views:

1971

answers:

4

Hello all,

I'd like to change the security attribute of a directory that InstallShield creates under the CSIDL_COMMON_APPDATA - can someone please advise on how to do that during the installation process?

It's a script-defined folder.

Thank you.

A: 

I don't know whether a Installshield builtin function exists for that. The simple solution is to create a DLL that does the real work of manipulating the security attributes and call it once the directory is created.

Typically, one might want to change the access so that everyone is able to read/write to the whole directory or file(s) within it.

Yes, it could work as a work-around, but I'm hoping for something built-in :) If nothing comes up, then that would be the only solution. Or to use calcs.
dennisV
+2  A: 

Under InstallShield 2008 it's

Installation Designer > Components > [somecomponent] > Destination Permissions

Note that the directory properties are attached to the component, while individual File permissions are set under the 'Files' node

This assumes you are letting InstallShield / Windows Installer handle directory creation. If you're creating the directory in a script then things start getting tricky if you need to ensure a clean uninstall.

sascha
Thank you. I do create the directory in the script - is there a way to set permissions then? And what would be the problems with uninstalling?
dennisV
+1  A: 

I think I found the answer for this - on this page: http://www.installsite.org/pages/en/isp_os.htm there's an ntperm.zip archive which contains a script that seems to do what I need.

dennisV
A: 

you can also just easily call Windows commands "CACLS.EXE" or "ICACLS.EXE" -both are easy command line tool, e.g.

icacls file /grant Administrator:(D,WDAC) - Will grant the user Administrator Delete and Write DAC permissions to file

Tom
Yes, I've looked at those, but from what I understand, icacls is not present on XP and cacls is deprecated on Vista. And who knows what will happen on the next Windows?
dennisV