Tuesday, March 10, 2009

Limited User Accounts

I'm usually working on a Solaris machine at work, but occasionally I need to use Windows. I don't do much development on it, but I use it a lot for creating presentations, reports, and design documents, as well as sending e-mails. When I use Windows at work (which isn't really that often), I'm forced to use a machine where I've only got a Limited User Account (LUA). I understand the account type is necessary the way we're doing things at work. But it was annoying because the LUA account prevents me from installing a lot of the programs I'm used to having and a lot of the OS tweaks I'm used to doing.

Apparently, there are a bunch of people who purposefully don't use an Administrator account, primarily for safety reasons. They've got a website over at http://nonadmin.editme.com where they explain how they use Windows with an LUA and are still be able to do all their day to day tasks. That website was an excellent resource. While it hasn't convinced me to use an LUA at home, I no longer have any complaints about using it at work. I got all my most important programs installed. I thought I'd share the two most important workarounds for me.

1. Installing DLLs

There's a program called RegSvrEx that will allow you to register your DLLs when you have a LUA. It's a replacement for RegSvr. Instead of registering the DLL globally (which is potentially dangerous for everyone, I guess), it has an option to just register the DLL for your account (which can only be dangerous for you.) So download the program from http://www.codeproject.com/w2k/regsvrex.asp and run it from command line using "RegSvrEx /c [path to dll]".

2. Adding Right Click Options

Notepad sucks. It really, really sucks. Not only will it mess up UNIX text files, it takes forever to open large files, looks really ugly... man, Notepad isn't good for much. As a text editor, I usually use Textpad. I couldn't get Textpad to install with an LUA, so I went with Notepad++, which is also excellent. But everything still opens with Notepad. Bah. This workaround allowed me to add Notepad++ to my right click menu, which saved me from so many "Open With" dialogues. It's really simple to do. Create a "notepadplus.reg" file with the following contents for your preferred editor and then execute it. This script is easily modifiable for whichever program you want to add to your menu. Please note that you will be modifying your registry:
  1. Windows Registry Editor Version 5.00  
  2.   
  3. [HKEY_CLASSES_ROOT\*\shell]  
  4.   
  5. [HKEY_CLASSES_ROOT\*\shell\[texteditor name]]  
  6.   
  7. [HKEY_CLASSES_ROOT\*\shell\[texteditor name]\command]  
  8. @="\"[path to editor, don't forget to escape '\' characters]\" \"%1\""  

No comments: