Logged-in user profile vs running-as user profile

Got a problem you cannot solve? Try here.
Post Reply
ru2
Posts: 19
Joined: Tue Apr 10, 2012 5:21 pm

Logged-in user profile vs running-as user profile

Post by ru2 »

Hello,

I am using InstallAware 10 with requireAdministrator for UAC Elevation. This works great for other things that I need and don't want to change that. However, when installing shortcuts to personal folders, I'd prefer if I could do it for the logged in user even if the installation required elevation. For example:
A standard user, "Bob", runs the installer. Windows UAC prompt asks for elevation by an admin account and they choose "Admin". Now since the installer is running as "Admin", using Get Folder for personal directories or expanding the %userprofile% environment variable returns things under the "Admin" account. Is it possible to get the location of personal folders for the "Bob" account while running as a different user?

Thanks for anyone that can advise.
Ruth
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Logged-in user profile vs running-as user profile

Post by FrancescoT »

You can get the All-Users location or the current User location. This last one refers to the user-context that executed the setup, and in case of Admin Elevation, of course this will be Admin context. This is OS behaviour.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply