What's the best way to set folder permissions?

I need to open up security to a number of folders on Windows XP (Program Files\AppnName, etc.) and have found the LockPermissions table a bit limited, i.e. it simply replaces permissions on the folder. The solution I'm aiming for is something along the lines of XCACLS, which allows you to edit the perms, keeping the existing inherited perms intact and allowing adding additional entries to be added. I've used Secedit in the past but I can't remember if that posed a similar problem, i.e. replace instead of edit.

The only option I can see is to create a custom script which calls XCACLS or edits the ACLs directly (think I had to use ADsSecurity.dll - oh well nevermind) - then add this to a wrapper script or as a custom action.

Suggestions/recommendations or any examples would be much appreciated. [;)]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
http://setacl.sourceforge.net
Answered 08/03/2005 by: rikx2
Purple Belt

Please log in to comment
0
ORIGINAL: rikx2

http://setacl.sourceforge.net


That's great, many thanks [;)]
Answered 08/04/2005 by: chipfork
Senior Yellow Belt

Please log in to comment
0
I have the batch file working but how do I add it to an MSI? I have Wise PS.

Thanks!

Gary
Answered 08/04/2005 by: dtcappdeploy
Senior Yellow Belt

Please log in to comment
0
You want to launch your BAT file during your install ?
Answered 08/04/2005 by: babric
Senior Purple Belt

Please log in to comment
0
Not sure what format I want it in (batch, vbs etc), but the setacl batch I have will modify the permissions on a file that is part of the MSI.
Answered 08/04/2005 by: dtcappdeploy
Senior Yellow Belt

Please log in to comment
0
Ok, I'm new in msi packaging, so take care I don't tell you stupid things... :-)

What you need is a Custom Action (CA).

A custom action is an action you create and that can do some interesting things, like launch an .exe, .bat, etc... or run a vbs.
The type of the custom action you build depends on the action you want to do.
You can create these action in the CustomAction Table.
For example, to launch a bat file, you have to fill the table as follow :

ACTION > MyCustomAction1

Type > 34 (You want to launch a file, and it seems that the only soluton to launch a BAT file is to launch it using this type of CA)

Source > A CA 34 use a Folder to launch the file. You can use SystemFolder

Target > Path on the target disk, to your file. For example : [INSTALLDIR]YourFile.bat

Summary :

ACTION : MyCustomAction1
TYPE : 34
SOURCE : SystemFolder
Target : [INSTALLDIR]YourFile.bat


More information here about CustomAction Table :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/customaction_table.asp

And about the different CA :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/custom_action_type_34.asp

hope that help.
If you need more detail please let me know.

EDIT : Do you need information about InstallXXXSequence ?
Answered 08/04/2005 by: babric
Senior Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity