Marz28
Posts: 14
Score: 0 Joined: 11/29/2006 Status: offline
|
I'm new to packaging and having some trouble. I'm creating a .msi and want that msi to set permissions on files and folder it deploy with a custom action. I read some posts and it seems there are a number of options to accomplish that, like: XCACLS, Secedit, SetACL. I prefer to use Secedit, because I find it easy to create an .inf file from Windows Security templates snap in, containing the required permissions. Here's what I tried: 1. I created a .inf file with the correct permission from the templates snapin. 2. I add this template to the .msi so that it is installed with all the files in the .msi to the apps folder. 3. I created .vbs to run secedit with the .inf file in step 2. I tested the script and that works properly. the code: --------------- Set objshell = wscript.createobject("Wscript.Shell") objshell.run ("secedit.exe /configure /db 'APPNAME' /cfg c:\progra~1\'APPFOLDERNAME'\'APPNAME'.inf /areas FILESTORE") --------------- 4. I add a custom action to the .msi with option "Vbscript installed with the product", "Immediate Execution" , "Synchronous Execution" , "Always Execute" And then I selected the .VBS created. 5. I sequence the custom action just before "Install Finalize" in "InstallExecuteSequence" Result: The Script runs, but cannot the the .inf. Seems logical because the script runs before file copy process has started... Also tried to sequence the the custom action after "Install Finalize" then it runs after file copy, but then I get an error that the script could not finish. Can some tell me how to create a working custom action combined with Secedit and .inf files to accomplish what i want? And.. Can someone explain when to use options like "immediate execution, Deferred, Rollback etc." Maybe some good links with info about that stuff. Thanks
|