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:
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?
Right-click the Actions explorer and then click New EXE. InstallShield adds an executable-file action to the Actions explorer.
InstallShield uses setup.exe as the bootstrap loader to call the Microsoft Windows Installer service. Setup.exe can accept command-line parameters that allow you to perform administrative installations, run silent installations, and complete other administrative tasks.
To add a custom action: 1. In the View List under Behavior and Logic, click Custom Actions and Sequences (in Basic MSI, InstallScript MSI, MSI Database, and Transform projects) or Custom Actions (in DIM, Merge Module, and MSM Database projects).
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With