Here's the scenerio: You have a system file that needs to be installed to the System32 folder. And, you have several HKEY_CURRENT_USER registry keys containing configuration information.
This causes problems since the installation writes a file to the System32 folder, which is locked down for non-administrator users. Read on for the solution.
To implement the third option, elevate security rights of the installation by using either:
RUNAS (Windows 2000 and later) SU (Windows NT 4)
This simple command line utility lets an external process execute with the rights of the username passed on the command line. This places the per-machine portions of the installation in a silent WiseScript that executes as part of the main installation. Running this command results in a single-user .EXE that modifies both per-machine and per-user sections of the registry correctly.
.EXE Path. %SYS32%\runas.exe Command Line. /user:domain:userid .
Because the RUNAS command does not pass a password on the command line, do not select Hidden from Window Size if a password is needed to execute the installation. Sanur, a free utility, lets you pipe a password to RUNAS so the installing user does not have to enter in an administrator password at runtime.
By using a command line utility, you can create clean, easy-to-run installations for all users.