Reputation: 137
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?
In out installer, we set PrivilegesRequired=lowest
and with installed files permissions: everyone-full admins-full
.
Upvotes: 1
Views: 2411
Reputation: 202652
You can use PrivilegesRequired=none
.
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:
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.
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.
Upvotes: 1