I have an Inno Setup installer that needs to restart the explorer (in order to install a shell extension). During installation, I can start explorer.exe with ShellExecAsOriginalUser so that it doesn’t start with admin privileges; this is important on Windows 8, because running explorer with admin privileges prevents Metro apps from running.
The trouble is that this function can’t be called during uninstall, as stated in the documentation (I tried to do it anyway, but of course it fails). I don’t understand why it’s not possible. Any clue? Is there a workaround?
It cannot be called during uninstall because the Programs and Features control panel always starts the uninstaller with elevated permissions (when running a per-machine uninstaller, anyway); the “original user” is therefore still the admin user.
In this situation, probably the correct thing to do is to just use the latest version of Inno — this includes Restart Manager functionality which should automatically sort Explorer out without you having to do anything.