Friday, February 1, 2008

A few Windows Tips and Keyboard Commands.

This week + weekend marks Career Service's 32nd Annual Overseas Recruiting Fair and I've been back and forth all week helping maintain the technical parts of it. To say the least it's been quite a headache, the computers don't really seem to be cooperating. We found a few write-ups on the internet about changing a value in the Registry to "3" to keep the computers always on and not go to sleep, but unfortunately about half of them have been doing this properly. However the tech part of the fair hasn't been a complete nightmare. My scripts to temporarily block Teachers from the database system, and then revert back worked seamless and I've really enjoyed the new information that I gained from creating such scripts. Another plus is that I have acquired a few new tips and keyboard commands that I find incredibly productive.

First keyboard command that I'm starting to use religiously was actually shown to me by Dale. "Windows Symbol + R" prompts you with a "Run" window. From here you can quickly open up something like cmd.exe, which I opened probably a million times over the last few days.

Another thing that I learned is the fact that you can open a folder location from this. For instance, say I wanted to check the current "hosts" file to see what is being blocked, I simply push "Windows Symbol + R" to open a Run window, and then type "C:\WINDOWS\system32\drivers\etc\". This is much quicker than using the mouse to go to My Computer, then clicking on C:\ then clicking on WINDOWS, then system32, etc., etc., you get the idea. This is is very similar to why I love Terminal in unix/linux/Mac OS X because you can very quickly just cd into any directory. Though you can cd in cmd.exe, you don't get the convenience that you get in *nix/Mac OS X. For example, in Mac OS X, I can simply enter the command "open ~/Documents/School" and it will open the School folder. Unfortunately Windows' cmd.exe does not have this open command, but I do also like this "Run" alternative.

Another keyboard command that I like a great deal, and use along with the tip stated above is the "Ctrl + W" keyboard command. In Mac OS X this is an amazingly powerful and extremely quick command. It essentially closes the current in focus window/tab. For instance, say I have 5 Safari windows open. Say I'm done reading the article I'm currently looking at and just want to close the window, but I don't want to completely quit out of Safari because I have more items in my Google Reader. Simply push "Apple + W" and it will close the current Window. This also works with Tabs in Safari. Say you have a 20 tabs open and you're done with that page, simply push "Apple + W" and Safari closes out the current tab. As far as I know, it works with just about every App on Mac that I've come across. Unfortunately the same cannot be said about Windows. It seems to work in most apps but not all. Still the fact is it works with Windows Explorer windows. Personally this makes the "Run" technique a million times better because you can simply open, view the contents of any folder you want and then close it all without touching your mouse. Obviously this comes in handy when you are doing a lot of repetitive tasks such as the ones I was doing yesterday.

This last one I've always known about, but always seem to forget the exact syntax. After doing at the fair probably more than any other command, I don't think I'll ever forget it but just feel like posting it for kicks. It is a very powerful command, especially when you're working in an environment where the computers are incredibly locked down and you don't want to deal with logging off, then logging on to an administrative account, then logging off, and logging back on, over and over. So without further a due the "runas" command is as follows:

runas /u:administrator "cmd.exe"

Obviously, change "administrator" to whatever user you want, though administrator maybe what you want. And lastly change "cmd.exe" to any command you want to do. You'll then be prompted for the administrative (or username that you choose) password and then should be good to go.

Tip: If you do happen to get an error saying "... is not a valid Win32 application." such as when attempting to "runas" compmgmt.msc (the Computer Managment window), or desk.cpl (the Display Properties window) simply do the "runas" command and run "taskmgr". From here you can then go to "File," and then "New Task," and type "compmgmt.msc" or "desk.cpl".

No comments: