Folder permissions after reboot
I am working on a MSI application which requires reboot. After reboot, it creates a set of folders in All users profile. I need to give permissions to this folder, so I'm using a batchfile which calls SetACL. Then, I've placed this batch file path in Runonce key.
Is it the correct method?
As after reboot, only few folders get permissions and few doesn't. May be because some folders are getting created after 5 -10 mins after the machine is up. So, even if the runonce key is correct, it doesn't apply permissions on the folders which don't exist that time. Any ideas how to resolve this. Thanks !
Is it the correct method?
As after reboot, only few folders get permissions and few doesn't. May be because some folders are getting created after 5 -10 mins after the machine is up. So, even if the runonce key is correct, it doesn't apply permissions on the folders which don't exist that time. Any ideas how to resolve this. Thanks !
0 Comments
[ + ] Show comments
Answers (11)
Please log in to answer
Posted by:
Matias M Andersen
13 years ago
Create the Profile directory structure that needs permission in yor MSI/MST package (If the folder is empty make sure its present in the CreateFolder table or it wont get created)
Make sure you have a HKEY_CURRENT_USER registry key set as KeyFile in the same components as your CreateFolder entry
Create a Custom Action just before Install Finalize, to set the required permissions and have it run when the following condition is true Not REMOVE~="ALL"
For quick repair mechanism use a CurrentUser feature structure (not required tho)
When user Launch the application, the MSI will repair the directory structure and set the permissions
If there are no Advertised shorcuts available, use Active Setup to initiate the repair for the users first time they log on.
Make sure you have a HKEY_CURRENT_USER registry key set as KeyFile in the same components as your CreateFolder entry
Create a Custom Action just before Install Finalize, to set the required permissions and have it run when the following condition is true Not REMOVE~="ALL"
For quick repair mechanism use a CurrentUser feature structure (not required tho)
When user Launch the application, the MSI will repair the directory structure and set the permissions
If there are no Advertised shorcuts available, use Active Setup to initiate the repair for the users first time they log on.
Posted by:
itolutions
13 years ago
Posted by:
itolutions
13 years ago
Posted by:
Matias M Andersen
13 years ago
Posted by:
vish_zen
13 years ago
Posted by:
anonymous_9363
13 years ago
No need for self-healing/repair or Active Setup, as the folder tree is in the All Users profile.
I generally run SetACL after the CreateFolders action so that time isn't wasted applying permissions to files as well: they inherit the folder's permissions when InstallFiles action begins copying the files. Your Custom Action should be in the Deferred sequence, as it's making system changes. You will therefore need to use the special CustomActionData property to pass in the folder name you're going to permission.
I generally run SetACL after the CreateFolders action so that time isn't wasted applying permissions to files as well: they inherit the folder's permissions when InstallFiles action begins copying the files. Your Custom Action should be in the Deferred sequence, as it's making system changes. You will therefore need to use the special CustomActionData property to pass in the folder name you're going to permission.
Posted by:
Matias M Andersen
13 years ago
Posted by:
Dodgyguy
13 years ago
Just to sound like an idiot here, but what is SetACL? is this what we are talking about http://www.helge.mynetcologne.de/setacl/
Why can't we use CACLS as a custom action?
Why can't we use CACLS as a custom action?
Posted by:
Matias M Andersen
13 years ago
You can use whatever permission tool you like, as long as it gives you the result your after.
Cacls for example is a very basic permission editor and is very very limited in it's functionality. I tend to use Microsofts SubInACL tool when im "forced" to set permissions using CA's.
Cacls for example is a very basic permission editor and is very very limited in it's functionality. I tend to use Microsofts SubInACL tool when im "forced" to set permissions using CA's.
Posted by:
vish_zen
13 years ago
Posted by:
vish_zen
13 years ago
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.