View Single Post
Old 24th November 2015, 19:18   #9
Major Dude
LoRd_MuldeR's Avatar
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
If I understood the OP right, he wants to launch an uninstaller from his "main" installer - which works from elevated ("admin") user context, but not from non-elevated ("classical") user context. So, it sounds to me like the typical "unable to start a process that requires elevation from non-elevated process" (code #740) problem. The uinstaller probably requires elevation, as per its Manifest, so Exec or ExecWait are going to fail when the "main" installer is not already elevated. The ExecShellWaitEx function can resolve that problem.

If we are running on a "legacy" system without UAC, there is no such thing as "elevation". So there are only two possibilities: Either the current (logged on) user is an "admin" user, or not. Consequently, the only thing that really can be done by an (un)installer that requires "admin" rights is: Detect the current user-type via UserInfo plug-in – and abort with error if the current user is not an "admin" user.

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration:
LoRd_MuldeR is offline   Reply With Quote