Thursday, November 12, 2009

Windows 7 less known commands

I am using Windows 7 for about 3 or 4 months now and I finally got some time to go over Tips and Tricks sites and explore a bit. Majority of the tips I have found were not new, especially if you were using Vista.

Anyway here are some keyboard shortcuts I did find very useful.
  • Start + Shift + Left Arrow and Start + Shift + Right Arrow toggle between monitors
  • Start + Home - minimizes all inactive windows. Repeat to restore them.
  • Start + 1, Start + 2... - Launch 1st icon on Taskbar. This works for first 5 icons
  • Start + T to activate icons on your Taksbar
These are just some of the shortcuts. It is easy to find out other ones.

Windows 7 has some brand new tools. One of the really interesting tools is the PSR.EXE or Problem Steps Recorder. This is very valuable tool if you are involved in any kind of technical/IT/application support. How often do you ask a customer "What did you do exactly to get this error?" and get an answer like "Just clicked the OK button." And we know they did more than that. PSR records all actions including menu options. Upon finishing recording of actions a ZIP file is created and it can be easily e-mailed. The zip file contains a web page with screenshots . Here is an example page I recorded earlier. Note that it captures both screens.


Of course your clients have to run Windows 7 first because it does not runs on Vista (I have tried)...

There are other commands I have found and description what they do:
  • forfiles.exe
  • getmac.exe
  • isoburn.exe
  • tasklist.exe
  • taskkill.exe
  • typeperf.exe



FORFILES [/P pathname] [/M searchmask] [/S] [/C command] [/D [+ | -] {dd/MM/yyyy | dd}]

Selects a file (or set of files) and executes a command on that file. This is helpful for batch jobs. Full description is available on command prompt by using forfiles.exe /? and here is one of the examples

FORFILES /M *.txt /C "cmd /c if @isdir==FALSE notepad.exe @file"

The command above will search for *.txt files in current directory and open them in notepad. @file variable is available in forfiles utility. If you like writing batch files you will like this one.



Very simple command to display mac address of network adapters. It may be an alternative to using ipconfig command.

Physical Address    Transport Name
=================== ==========================================================
00-16-D4-9B-B2-31   \Device\Tcpip_{750873C4-D970-4336-BA43-5010390F969E}
00-14-A5-F4-B5-48   Media disconnected



Finally Windows have a tool to burn an ISO image to a disk. It simply needs drive letter and path to ISO image file.



Show information about users logged on the system. Example:

>john                  console             1  Active      none   12/11/2009 7:33 p.m.

If you want to see processes and/or to kill a process on command prompt then TASKLIST and TASKKILL are the tools for you. Names should be explanatory - list current processes/tasks and second one to kill it.



I like this tool. Instead using Task Manager now you can show chosen performance counters on command prompt, file or SQL database. There are several options you can specify and here are some samples:

typeperf "\Processor(_Total)\% Processor Time"
typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
typeperf -qx PhysicalDisk -o counters.txt


That is all for now but if I find something else interesting I'll let you know.

No comments:

Post a Comment