Previous Page

Published on September 7th, 2010

Featured Image

Intro

Working across the different Operating Systems you realize that you always wish you had tools that the other OS had. In Linux the shell is just plain awesome. In windows they have made some improvements with the PowerShell, but still young compared to shells like BASH. If you work with the plain old DOS command line you realize how super week it is compared to the BASH shell. So if you want to give your command a little boost here is the trick to bring tail (real time output buffering) into DOS. This comes in really handy when working with log files, for example tracking down issues with IIS and seeing logs as the come in without having to open notepad every time to refresh the log.

Getting Started

1. Grab the Windows Server Resource Kit
If the link above does not work just search microsoft.com for it.

2. Download and Install
It will be installed in C:\Program Files\Windows Resource Kits\Tools

3. Now you can use the handy “tail -f” from the command line.

4. To right click and tail a file.
– Take the inf code block below and make a new file called “tail.inf”.
– Right click on the file (tail.inf) and click install
– Now you can right click on any txt file and in the context menu you will see a menu option that says “Tail Here”. Now your ready to act like a real linux user

inf info: (save data below line to a file)
————————-
; Command Here
[Version]
Signature = “$Windows NT$”
Provider = %Provider%

[Strings]
Provider=”Tail Tools”

[DefaultInstall]
AddReg = AddReg

[AddReg]
;reg-root,[subkey],[value-entry-name], [flags],[value]
HKCR,txtfile\Shell\Tail,,,”Tail Here”
HKCR,txtfile\Shell\Tail\command,,,”C:\Program Files\Windows Resource Kits\Tools\tail.exe -f “”%1″””

Need quick access to a command line?

If you work with computers on a regular basis then you will find yourself needing the DOS command window. Many times you will need the path of a directory and when that directory is super long it can be a hassle to cut and paste. Here is a quick tool trick to add a right click command prompt based on the selected directory…

Cut and paste this code into notepad and save it as a “.inf” extension. Then right click on the file and click install.

; Command Here
[Version]
Signature = “$Windows NT$”
Provider=%Provider%

[Strings]
Provider=”Quick Cmd”

[DefaultInstall]
AddReg = AddReg

[AddReg]
HKCR,Directory\Shell\CmdHere,,,”Command Here”
HKCR,Directory\Shell\CmdHere\command,,,”%11%\cmd.exe /k cd “”%1″””
HKCR,Drive\Shell\CmdHere,,,”Command Here”
HKCR,Drive\Shell\CmdHere\command,,,”%11%\cmd.exe /k cd “”%1″””f

1 thought on “Spice Up Your DOS Life?”

Comments are closed.