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. [;)]
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)
Please log in to answer
Posted by:
chipfork
19 years ago
Posted by:
dtcappdeploy
19 years ago
Posted by:
dtcappdeploy
19 years ago
Posted by:
babric
19 years ago
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 ?
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.
so that the conversation will remain readable.