InstallShield - you need to run an arbitrary .exe action in administrator mode

Using a custom action in InstallShield, I try to run the .exe file during installation in order to register a third-party service..exe must be run in administrator mode. This will need to be run in user interface mode or in silent mode. This is a set of third-party files that are deployed through our installer, but I need to execute it during the process.

I tried to execute it from "Install Exec Sequence" "After installation of files" (and also tried "After Publish Features"). In this case, I get the following dialog box:

enter image description here

I also tried it from the "Exec Administrator Sequence" "After InstallFiles", but this does not work at all. The program will be installed, but I need to manually run the command to make everything work.

I also have In-Script execution set to "Delayed execution" and "Return processing" set to "Synchronous (Check exit code)".

So, could I use some recommendations on where this should be done? Install Exec Sequence? Admin Exec Sequence? After what stage?
At what point is the program written out and available for execution?

+6
source share
1 answer

I got this job. The key was to set the value to "Delayed execution in the system context". If you just set the value to "Delayed execution", it starts in user mode.

enter image description here

In addition, the "Admin Exec Sequence" is not called in this case. To run this path, you must run .msi with / a. It is useful for administrators to manage installations on many machines. ( Microsoft Description )

+7
source

Source: https://habr.com/ru/post/982966/


All Articles