Hey everyone,
For those of you familiar with Unix/Linux, you know about the su (superuser) command. In Windows, the closest thing is the runas.exe command (or the Run as different user check box).
In the Unix/Linux world no one logs on as root (admininistrator) for day to day work because of the risk or rogue programs or simple mistakes breaking something.
But Windows isn't there yet and many applications still don't run unless you have full privileges (Age of Empires!). But the ideal is still to log on as a User or Power User for day to day work to protect you from viruses, mistakes, etc.
Well, I've figured out a command that lets you approximate the su functionality under Windows.
The concept is to bring up an Explorer window that's running as root from which you can install programs, run Control Panel applets, etc.
Here's the command:
%windir%\System32\runas.exe /user:root "C:\Program Files\Internet Explorer\IEXPLORE.EXE c:"
To create it, make a shortcut on your desktop to the cmd program. Then edit the target and copy in the command above. This assumes your Internet Explorer is installed in the default location. Modify for your environment.
Run this shortcut as a non-admin user to test it out. It will bring up an explorer window. From the address drop down, select Control Panel and run the Users and Passwords applet to prove that you are indeed running as admin.
Note that you can make a faster starting version by specifying the machine name with the userid:
%windir%\System32\runas.exe /user:myMachine\root "C:\Program Files\Internet Explorer\IEXPLORE.EXE c:"
I've tested this under Windows 2000 installing programs and changing system settings successfully. Note that if you change your user group membership it doesn't take affect until you relogin. This is just the way Windows works, unfortunately.
If you try this, I'd like to know what works and doesn't work using this technique.
David