I'm using InstallShield to create an MSI that runs a .cmd file which calls a powershell script. The powershell script changes 2 registry keys. One it is removing a DENY right on a registry key for SYSTEM and the other it's changing a key's value from 0 to 1.
The script runs fine when manually executed or when I simply run the .cmd file that's used within the .MSI.
When I run the .msi, however, the cmd file runs... the powershell script executes and the value gets changed from 0 to 1... however, the DENY is not removed. The msi is running an executable custom action which I named RunCMD it is set to run in "Deferred Execution in System Context" and set to run After PublishFeatures.
I am at a loss as to why running the .cmd in this way (should be elevated) is not executing the portion of the powershell script which alters the permission on the registry key but it does allow for the value change on the other key. The script definitely runs but it partially fails when run within the .msi.
Again, if I manually run the .cmd file myself the script runs without issue so it's not a problem with the script itself.