Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 575
doobop Avatar asked Feb 25 '15 00:02

doobop


People also ask

How do I run an EXE file in InstallShield?

Right-click the Actions explorer and then click New EXE. InstallShield adds an executable-file action to the Actions explorer.

What is InstallShield setup EXE?

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.

How do I create a custom action in MSI?

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).


1 Answers

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)

like image 172
doobop Avatar answered Sep 25 '22 20:09

doobop