Logged-in user profile vs running-as user profile

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

Logged-in user profile vs running-as user profile

Postby ru2 » Wed Dec 21, 2022 11:28 am

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: 5360
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Fri Dec 23, 2022 1:28 pm

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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 47 guests