View Single Post
Old 24th November 2015, 20:34   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
Angry

Quote:
Originally Posted by LoRd_MuldeR View Post
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.
Why do you insist on going round in circles? We already know the installer requested elevation in the manifest so it is certainly not the typical case you are referring to. If UAC is in the default configuration then we would already be elevated and if not then CreateProcess is not going to return 740. I have already told you several reasons why ShellExecuteEx alone is not enough so please stop recommending it!

Quote:
Originally Posted by LoRd_MuldeR View Post
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.
It might not have been called elevation back then but it is possible to elevate from normal user to admin on 2000/XP/2003 and the UAC plug-in does it. Your two possibilities suddenly became three. In UAC parlance this is called over the shoulder elevation...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote