I am still continuing my experiment in running as a LUA (aka Non-Admin). Let me tell you, it has been a total pain in the ass and now I totally understand why more developers do not do this, which feeds into the vicious cycle in which apps are developed that do not run well under least user privileges. When I have some time, I will write up my experiences.
One tool that has been invaluable in this experiment is the MakeMeAdmin batch file used to temporarily elevate your privilegs in a command window. This has worked nicely for me for a while.
Then Scott Hanselman
points out Console
that takes cmd.exe and adds transparency and tabs. Just pure geek hotness that I gotta have.
However, the only command shell I normally keep open is my MakeMeAdmin shell. It’d be a shame to install Console and never see its sleek hotness. So I decided to play matchmaker and see if I could marry these two wonderful utilities.
I modified the MakeMeAdmin.bat file to use Console instead. It was a one line change (note file paths should be changed to fit your setup and the line break in there is for formatting purposes. There shouldn’t be a line break.).
set _Prog_="console.exe c:\console_admin.xml
-t """*** %* As Admin ***""""
I also created a new admin config file named
console_admin.xml that specifies transparency and a red tint which lets me know that this console window is not like the others. It will run commands as an admin.
I’ve uploaded my modified MakeMeAdmin.bat file as well as the console configuration file to my company’s tool site here. Hopefully all five of you out there also running as a non-admin will find this useful.
tags: LUA, Least User Account, NonAdmin