Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid restart of a third-party installer under Inno Setup?

I'm using Inno Setup, and I need to install a third-party driver. Everything is OK, except that this third-party installation program asks to restart the machine, before my installation script terminate.

Example: I need to install two drivers, the second need the first installed, but the first driver needs to restart the machine.

[Run]

Filename: "FirstDriver.msi"; Flags: shellexec waituntilterminated; 
Filename: "SecondDriver.msi"; Flags: shellexec waituntilterminated; 

I'd like to restart only my installation is complete. How can I do it?

like image 377
Guilherme de Jesus Santos Avatar asked Nov 15 '25 11:11

Guilherme de Jesus Santos


2 Answers

The solution that worked for me was:

Filename: "{sys}\msiexec.exe"; Parameters: "/package ""{app}\FirstDriver.msi"" /qn /norestart /passive"; Flags: shellexec waituntilterminated; Check: not Is64BitInstallMode; StatusMsg: "Installing my First Driver";

I needed to specify that directory of msiexec.exe to work, using the constant {sys}, to get msiexec.exe from System folder.

like image 138
Guilherme de Jesus Santos Avatar answered Nov 18 '25 19:11

Guilherme de Jesus Santos


Try calling the third-party installers with the /norestart command-line argument:

[Run]

Filename: "FirstDriver.msi"; Parameters: /norestart; Flags: shellexec waituntilterminated; 
Filename: "SecondDriver.msi"; Parameters: /norestart; Flags: shellexec waituntilterminated;

Edit

See this question for more details.

like image 31
Bernard Avatar answered Nov 18 '25 20:11

Bernard