简体   繁体   中英

Workaround for 'Apps & features' in Windows 10 starting a single-user uninstaller elevated

When users try to uninstall their own single user installation (for example installed using lowestprivileges none and HKCU entries ) with 'Add/Remove Programs' in the Control Panel, everything works fine (that is, non-admin users can uninstall their own non-admin installation).

However the uninstaller will be elevated, when users start it from 'Apps & features' (Windows 10).

This seems to be a known Windows 10 bug:
How to prevent uninstaller elevating for Standard Windows 10 user?

Is there a way to work-around this issue when the Inno Setup uninstaller is started from 'Apps & features' ? Link this NSIS Workaround for Windows uninstaller elevation bug .

You will have to do exactly what that NSIS hack does.

  1. Find out what is the Windows GUI user (and assume that you should uninstall as that user). Alternatively, you can store the username into some file in the installation folder.

  2. Re-execute the installer as that user. That hack uses StdUtils NSIS plug-in with its ExecShellAsUser function. Maybe the DLL can be used from Inno Setup. If not, you can at least reuse its code.

All this is imo to much to ask in a single question. If you have specific problems, consider asking more specific questions.


Simpler alternative would be to prevent the uninstallation, when executed as different user, and show a suggestion to the user to go to Control panel instead.

For a similar question, see Uninstaller trouble with standard Windows user .

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