InstallShield – Need to run custom action .exe in admin mode

installshieldwindows-installer

Using a custom action in InstallShield, I'm trying to run a .exe file during the installation to register a third party service. The .exe needs to run in admin mode. This will need to run in either UI mode or silent mode. This is a set of third party files that get deployed through our installer but I need to execute one during the process.

I've tried executing it from "Install Exec Sequence" "After Install Files" (and also tried "After Publish Features"). In this case I get the following dialog:

enter image description here

I've also tried it from "Admin Exec Sequence" "After InstallFiles" but this appears not to run at all. The program will install, but I need to manually run the command to get things working.

I also have In-Script execution set to "Deferred Execution" and Return Processing set to "Synchronous (Check exit code)".

So, I could use some guidance on where this should execute?
Install Exec Sequence? Admin Exec Sequence?
After which stage?
At which point is the program written out and available to execute?

Best Answer

I got this working. The key was to set the value to "Deferred Execution in System Context". If just set to "Deferred Execution", it runs in user mode.

enter image description here

Also, the "Admin Exec Sequence" is not called in this case. The .msi need to be run with /a to run this path. It is useful for administrators to manage installations over many machines. (Microsoft's Description)

Related Topic