I'm trying to execute a custom action during a wix installation and getting an error when the custom action gets called. I want to add the permission group "Everyone" with full control to a folder using cacls. When I run it from cmd it works fine but from the installer it doesnt work. Below is the error message from the wix installation log.
Info 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: SetPermissions, location: , command: "c:\Windows\SysWOW64\cmd.exe" cacls "c:\Program Files\Test" /g everyone:f /e
Here is my custom action in the wix file
<CustomAction Id="SetPermissions" Property="PermissionsAction" ExeCommand="" [SystemFolder]cmd.exe" cacls "[Folder]." /g everyone:f /e" Execute="immediate" Return="ignore" />
<CustomAction Id="PermissionsAction" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="SetPortalDataPermissions" Before="InstallFinalize">
</Custom>
</InstallExecuteSequence>