jory99
1st October 2007 12:35 UTC
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
1st October 2007 16:50 UTC
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
2nd October 2007 13:03 UTC
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
2nd October 2007 13:21 UTC
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
2nd October 2007 18:22 UTC
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
2nd October 2007 18:35 UTC
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