Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

trying to run setacl causes 1721 error

I have created a custom action to run the setacl.exe to add permissions to the registry.

I use the following command line:

"[ProgramFilesFolder]setacl.exe" -on "HKLM\software\HRH" -ot reg -actn ace -ace "n:%COMPUTERNAME%\NT SERVICE\Name;p:full"

When I run the command line manually the permission is added with no problem.

Below is what I get in my log file:

MSI (s) (94:F0) [11:54:53:808]: Doing action: SetPermission
Action 11:54:53: SetrPermission.
Action start 11:54:53: SetPermission.
MSI (s) (94:F0) [11:54:53:824]: Note: 1: 1721 2: SetPermission 3: C:\Program Files\HRH\SetACL.exe 4: "C:\Program Files\HRH\setacl.exe" -on "HKLM\software\HRH" -ot reg -actn ace -ace "n:%COMPUTERNAME\NT SERVICE\Name;p:full"
Error 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: SetPermission, location: C:\Program Files\HRH\SetACL.exe, command: "C:\Program Files\HRH\setacl.exe" -on "HKLM\software\HRH" -ot reg -actn ace -ace "n:%COMPUTERNAME%\NT SERVICE\Name;p:full"
Action ended 11:55:01: SetPermission. Return value 3.

Does anyone have any idea how to get setacl.exe working?

Thanks in advance
Labels (1)
0 Kudos
(1) Reply
Level 6

I have made some progress I have managed to stop the 1721 error the installer will run with no errors but the permissions are not added to the registry. Yet the same command line code done manually afterwards works perfectly?

I have now a custom action which will launch setacl.exe (installed with product)

Command line is: "[INSTALLDIR]setacl.exe" -on "HKLM\software\HRH" -ot reg -actn ace -ace "n:%COMPUTERNAME%\NT SERVICE\GravitasWellManager;p:full"

Return processing is synchronous (ignores exit code)

In script execution is Defered Execution in system context

Install Exec sequence is after start services

Condition not installed

I have also attached the log that I get the custom action is called setgravitaswellmanagerpermission.
0 Kudos