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

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
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.
Answered 10/12/2011 by: itolutions
Orange Senior Belt

Please log in to comment
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?
Answered 10/12/2011 by: Matias M Andersen
Senior Yellow Belt

Please log in to comment
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.
Answered 10/12/2011 by: vish_zen
Senior Yellow Belt

Please log in to comment
1
if you know names of folders you can create folders during installation.
Answered 10/12/2011 by: itolutions
Orange Senior Belt

Please log in to comment
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.
Answered 10/12/2011 by: Matias M Andersen
Senior Yellow Belt

Please log in to comment
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.
Answered 10/12/2011 by: VBScab
Red Belt

Please log in to comment
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..
Answered 10/12/2011 by: Matias M Andersen
Senior Yellow Belt

Please log in to comment
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?
Answered 10/12/2011 by: Dodgyguy
Senior Yellow Belt

Please log in to comment
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.
Answered 10/12/2011 by: Matias M Andersen
Senior Yellow Belt

Please log in to comment
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.
Answered 10/13/2011 by: vish_zen
Senior Yellow Belt

Please log in to comment
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 !
Answered 10/13/2011 by: vish_zen
Senior Yellow Belt

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