/build/static/layout/Breadcrumb_cap_w.png

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 !

0 Comments   [ + ] Show comments

Answers (11)

Posted by: Matias M Andersen 13 years ago
Senior Yellow Belt
2
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.
Posted by: itolutions 13 years ago
Purple Belt
1
if you know names of folders you can create folders during installation.
Posted by: itolutions 13 years ago
Purple Belt
0
If you are giving permissions to AllUsers subfolders you can just call SetACL from your msi (sequence your action after "install finilize").
Also check 'inheritance' options.
Posted by: Matias M Andersen 13 years ago
Senior Yellow Belt
0
A couple of questions needs answers in order to give you the correct answer:

1. Are the directories in the profile folder created during launch of the application (Auto-repair)?
2. What OS are you deploying your MSI to?
Posted by: vish_zen 13 years ago
Senior Yellow Belt
0
Thanks itolutions & Matias for your reply.

1. The directories in the profile folder are created after the machine is reboot. No need to launch the application or Auto-repair.
2. This is for XP.
Posted by: anonymous_9363 13 years ago
Red Belt
0
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.
Posted by: Matias M Andersen 13 years ago
Senior Yellow Belt
0
ORIGINAL: VBScab

No need for repair or Active Setup, as the folder tree is in the All Users profile.



True.. Missed the tiny "All users" part of that sentence..
Posted by: Dodgyguy 13 years ago
Senior Yellow Belt
0
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?
Posted by: Matias M Andersen 13 years ago
Senior Yellow Belt
0
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.
Posted by: vish_zen 13 years ago
Senior Yellow Belt
0
Thanks VBScab & Matias for the detailed explanation. That is really helpful.
Well, I may also try to check the trick mentioned by itolutions in post 5.
Posted by: vish_zen 13 years ago
Senior Yellow Belt
0
ORIGINAL: itolutions

if you know names of folders you can create folders during installation.


This worked for me. Your's and Matias's post is rated now. Thanks !
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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