Skip to content
⌘ NSIS Forum Archive

Problem with Vista/RequestExecutionLevel

6 posts

jory99#

Problem with Vista/RequestExecutionLevel

Hi Forum,

I am currently porting our Windows XP installer to Vista. I am using 'RequestExecutionLevel admin' to make it run using appropriate privileges.

The problem is, when I use this the shortcuts get installed for the privileged account (local administrator in this case) rather than the account of the desktop user that started the installer. Is there a way around this?

I have also tried using an installer without 'RequestExecutionLevel admin', but then I get a notification at the end saying that the installation was not correct.

Thanks in advance for any help.
Jonas
Anders#
use "SetShellVarContext all" before you create the shortcuts (this will put them in the "all users" startmenu, if you don't want a all users type install, you could use the UAC plugin and executecodesegment, but its not pretty)
jory99#
Thanks Anders,

I would prefer not to install for all users, so I'll look into your tip re UAC plugin!

Thanks for your help.
Jonas
Anders#
Its not really about what you prefer, with vista and an installer running as admin, the installer might not be running as the user you think it is running as (It could be elevated with an admin account, different from the user's explorer.exe etc.) So unless you are installing a driver or something that really needs admin rights, you might want to try to make it work as a normal user
smatte#
You should read about bootstrapping. You'll have to split your installer to have an installer running as user that start an other installer as admin to install files.
Anders#
Originally posted by smatte
You should read about bootstrapping. You'll have to split your installer to have an installer running as user that start an other installer as admin to install files.
This is exactly what the UAC plugin does