简体   繁体   中英

Inno Setup: Post Install Program Launches, installer still "active"

I'm currently attempting to create a installer script in Inno Setup, and pretty much have all the functionality I need in it. The one issue I'm running into is with the following line of code:

[Run]
Filename: "{sd}\my_file\something\bin\Program.exe"; Flags: postinstall unchecked;

Now, it does do the intended behavior of allowing me the option of launching the software, with the checkbox defaulting to unchecked. No issue there. What is happening is that when I check the box to launch "Program.exe" after the installation is finished, the program opens, but the installer is not killed. At the moment, "Program.exe" is up and running, but the installer application/process is still on the task bar (I'm running Windows 10 Professional in a VM) and in the Task Manager. However, upon killing the program that launches upon completing the install, the installer is killed as well. I'll include the [UninstallDelete] section below just so you can all see how I'm trying to end the installer:

[UninstallDelete]
Type: filesandordirs; Name: "{app}";
Type: filesandordirs; Name: "{sd}\customdir";

Additionally, I'm using UseRelativePaths=True but I'm almost certain that doesn't matter. Since this installer is going to our production staff, the installer not killing itself once the program was launched from the post install window is an issue. Anyways, any help would be appreciated.

You need to add nowait flag .

As the documentation shows, the typical set of flags to be used for your purpose is postinstall nowait skipifsilent :

Filename: "{app}\MYPROG.EXE"; Description: "Launch application"; \
    Flags: postinstall nowait skipifsilent unchecked

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM