Page 1 of 1

Logged-in user profile vs running-as user profile

Posted: Wed Dec 21, 2022 11:28 am
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

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

Posted: Fri Dec 23, 2022 1:28 pm
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.