Suppress UAC
How to suppress UAC in Vista? I need my installer.exe run totally automatically.But if the UAC is on on Vista, it need user elevates.
Archive: Suppress UAC
Suppress UAC
How to suppress UAC in Vista? I need my installer.exe run totally automatically.But if the UAC is on on Vista, it need user elevates.
requestexecutionlevel user
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.32
(Of course, this will not grant you administrative access. But that is the whole point of the administrator password.)
thanks. Does that mean I must login as a user instead of admin to run the installer?
No. It just means that any user running the installer will NOT get the UAC elevation prompt on Win Vista and higher. (Remember, Windows UAC pops up even for Administrator users when they run an admin-only application.)
admins are members of the user group (normally)
It just means you can't write to programfiles/windir/HKLM etc
I tried the user, still have the "Allow/Cancel" prompt. Is that because I have some statements in the script to write to HKLM, and copy files to ProgramFiles?
did you put "requestexecutionlevel user" in your script?
yes, i do
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! for UAC Plugin*/
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
There are other registry writing lines in -Post
Then I log into my Vista as an account in Admin group, and run this installer.exe from %Public%. Still have the "Allow/Cancel" prompt.
But I also have your UAC plugin in the .onInit
UAC::RunElevated
Is that causing the prompt?
um, yes, what do you think RunElevated means?
Originally posted by AndersHehe, that is added by a NSIS expert guy from my company:-)
um, yes, what do you think RunElevated means?
I take out the UAC plugin. But installing windows service has "Access is denied" error. Does that mean, I must use admin in the "RequestExecutionLevel"?
Yes. Unless you are using the NSIS UAC plugin, which is a special case. In that case, you need to use requestexecutionlevel user.
The point is: If you want your installer to do something that only admins are allowed to do, naturally the installer will need admin access.