/build/static/layout/Breadcrumb_cap_w.png

Custom action to run cacls

I don't know if anyone can help me with this, but it's worth a shot.

I have a small msi package I have created from a legacy install. I need to assign the local machine's "User" group more rights than the default inheritence from the system drive gives it. I had no luck assigning local groups permissions in Wise, and cannot find a good place in the install sequence to place this custom action. When the folder I am running cacls on already exists, it works perfectly.

The problem is, when the folder is not already there, it errors out. So it seems no matter where I place the custom action in the sequence, it is running before Windows Installer creates the installation directory that I want to run cacls on.

Might anyone be able to offer any insight?

Thanks.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: WiseUser 18 years ago
Fourth Degree Brown Belt
0
After "InstallFinalize" in the "immediate" sequence. Or after "CreateFolders" in the "deferred" sequence (although after "InstallFiles" would be better).
Posted by: Foleymon 18 years ago
Orange Senior Belt
0
WiseUser is right.

Put down xcacls.exe as a file in your package, I usually put it in the WINDOWS\SYSTEM32 dir.

1-Open up the MSI
2-On the bottom select 'MSI Script'
3-Select the 'Execute Immediate' tab
4-Find 'InstallFinalize' (down at the bottom usually)
5-From Actions choose Execute Program From Installation (or Path)
6-Hit F1 for help on exactly how to fill those fields out.

Your command line will look something like this.
%SYS%xcacls.exe "c:\Program Files\YOUR_PROGRAM" /t /e /c /g Users:F /y

Hope that helps.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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