Archive: W2K/XP: Run program as original user on installer finish


W2K/XP: Run program as original user on installer finish
I'm not specifically talking about Vista here, but about W2K & XP

The "Run program" option on the last page of the Modern UI is nice but if the computer's user has a limited account, he will likely have run the installer using a temporary administrator account
(either by manually using the "runas" menu, or by having the installer being named "install.exe" or "setup.exe")

The problem is that the "Run program" option execute the program using the installer credentials, that is the temporary administrator account.
So if the program starts to store data under %APPDATA% or in HKCU, this will be the wrong user space..

I've been making research on Internet on how to solve this issue about running a non-admin program from an admin credentiels.
The articles & plugins I found so far seems to deal with DLL injection using hooks, but these don't work as SetWindowsHookEx don't work with processes from other users. (maybe those articles were Vista-related with the same user running elevated or not)
The alternate solution could be to run an initial installer as non-admin and execute the admin install from here, but I wish to avoid this solution.

Olivier


The current solution for Vista is running a bootstrap installer as non-administrator which executes the real installer as an administrator. It's implemented with the UAC plug-in but requires Vista specifics to elevate the second installer. I don't know of a better solution yet.


no it does not require Vista, the UAC plugin should provide a elevation dialog for win2000 and up