/build/static/layout/Breadcrumb_cap_w.png

Setting Folder Permissions

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

Answers (6)

Posted by: rikx2 19 years ago
Purple Belt
0
http://setacl.sourceforge.net
Posted by: chipfork 19 years ago
Senior Yellow Belt
0
ORIGINAL: rikx2

http://setacl.sourceforge.net


That's great, many thanks [;)]
Posted by: dtcappdeploy 19 years ago
Senior Yellow Belt
0
I have the batch file working but how do I add it to an MSI? I have Wise PS.

Thanks!

Gary
Posted by: babric 19 years ago
Senior Purple Belt
0
You want to launch your BAT file during your install ?
Posted by: dtcappdeploy 19 years ago
Senior Yellow Belt
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.
Posted by: babric 19 years ago
Senior Purple Belt
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 ?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ