Apologies if this has been answered before, but I can't seem to find an answer on the forums. I have written an installer under Vista, all works fine when I dont have UAC enabled under Vista. At all times, I am logged into Vista as an admin user.
Here is the problem. I am modifying my installer so that any Vista UAC prompts that appear, it should deal with them. I am falling over on the first hurdle where I want my installer to be elevated to admin level. Here is my code, relevant bits:
Here is what I see:
!include "UAC.nsh"
...
RequestExecutionLevel user
...
Function .OnInit
InitPluginsDir
${UAC.I.Elevate.AdminOnly}
FunctionEnd
1) Installer runs, creates a process setup.exe
2) Another process is created too, setup.exe
3) Installer fails with error message "This installer requires admin access, aborting!"
4) Installer fails with error message again "This installer requires admin access, aborting!"
5) Installer quits, processes all gone.
I have UAC turned on. I am admin user logged into Vista. (Maybe I need to be logged in as standard user?). I read in the forum that even if I am admin user, Vista does not run the installer process as admin user, runs as standard user?
Maybe I missed something out?
Any code/advice would be really helpful.
Thanks
Riz