Inno Setup Uninstall Application Running Another Users

Inno Setup Uninstall Application Running Another Users 9,8/10 5109 votes

This is the [Files] portion of my code so far:

Mar 04, 2017  Inno Setup: Install other installer and run it before continuing my install. This is the Files portion of my code so far: My program is dependent on another program to run. I've included the installer for this program ('otherinstaller.exe') in my installer. The Pascal script can also contain code invoked at uninstall time. See the Event Functions topic for more information. There is one thing that's important to be aware of when designing code to be executed at uninstall time: In cases where multiple versions of an application are installed over each other, only one Pascal script is run at uninstall time. Ordinarily, the script from the most recent install will be chosen. The Pascal script can also contain code invoked at uninstall time. See the Event Functions topic for more information. There is one thing that's important to be aware of when designing code to be executed at uninstall time: In cases where multiple versions of an application are installed over each other, only one Pascal script is run at uninstall time.

My program is dependent on another program to run. I've included the installer for this program ('other_installer.exe') in my installer. What I would like to do is launch this installer as soon as it has been copied, before continuing with 'myprogram.exe' and the rest. Soul land (season 2 episode 16.

Inno setup uninstall application running another users on iphone

I've googled and found the documentation for BeforeInstall in the Inno Setup Help, but they don't have an example of running another application. I believe it should be something like this:

Tshepang
6,35918 gold badges74 silver badges114 bronze badges
JuicyJuicy
3,61022 gold badges68 silver badges134 bronze badges

3 Answers

Better for the way you go might be the AfterInstall parameter. The following script will execute the RunOtherInstaller function right after the OtherInstaller.exe file entry is processed. There it tries to execute the just installed OtherInstaller.exe file and if that fails, it reports an error message to the user. Please note that you cannot interrupt the installation from that function, so it's not much safe to do what you want this way:

TLamaTLama
65.9k15 gold badges167 silver badges304 bronze badges

Another good time to run prerequisite installers is in the PrepareToInstall event function. (See the example scripts provided with Inno for the basic structure, and TLama's code for the actual execution.)

The main advantage of PrepareToInstall is that it allows you to handle errors and reboot requests from the child installer -- using AfterInstall doesn't.

The main disadvantage of it is that you have to manually ExtractTemporaryFile anything required to run the child install, as this occurs prior to files being extracted.

MiralMiral
8,5892 gold badges32 silver badges73 bronze badges

You can use AfterInstall, look for this in the Help.When file is just copied, i'll launch the function/procedure you put as 'AfterInstall:'.

In this function/procedure, use Exec and launch the other installer.

Community
Leo_ItalyLeo_Italy

Not the answer you're looking for? Browse other questions tagged installerinno-setup or ask your own question.

The situation is thus: We create an installer with Inno Setup. The software will be installed by an admin (e.g. when the computer is set up before it is given to the user), but we want normal users to be able to uninstall / update the installation (without admin rights). Adjusting permissions on installed files and running icacls.exe after the installation to grant rights for all users to access the uninstaller executable have gotten me almost to the goal.

The only thing missing is that if the administrator installs the program, it is not visible in Control Panel -> Uninstall a Program - list of other users. The (nonadmin) user has to know where to find the uninst000.exe and run it.

How can I make an Inno Setup install script so that any user (with or without admin rights) can uninstall the program via the Control Panel?

Martin Prikryl
97.7k23 gold badges201 silver badges421 bronze badges
Antti KarantaAntti Karanta

1 Answer

You can use PrivilegesRequired=none.

Inno Setup Uninstall Application Running Another Users Free

It's similar to PrivilegesRequired=lowest, except that it will try to write the non-user areas. This among other means that it will write the uninstall key to HKLM.

Note that none value is not officially documented anymore:

Inno Setup Guide

Another option is that you create the uninstall key in HKLM yourself. Use {uninstallexe} constant to resolve a path to the installer.

Though this will only add the uninstaller key to HKLM. But the uninstaller will still require administrator privileges, as long as the installer was run with administrator privileges. This is built-into the uninstaller and is not configurable in anyway.

This makes sense, as otherwise the uninstaller cannot remove its uninstaller key from HKLM.

2. Artcam download 32 bit. If file is multipart don't forget to check all parts before downloading!.

Anyway, if you really need to hack it, you can remove a flag from uninsxxx.dat that indicates the installer was run with administrator privileges.

Martin PrikrylMartin Prikryl
97.7k23 gold badges201 silver badges421 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged inno-setup or ask your own question.