A few weeks ago in my Career goals for next 6 months entry, I set a goal to find one new utility a month and learn how to use it. This month I picked one that I recently found and have started using often and since it is so simple, I decided to throw a few more similar utilities.
When I say ‘utility’ I'm using the term in a pretty loose manner, it isn't necessarily any application - in fact this month none of the seven are applications. This month’s utilities are all Windows Explorer ‘enhancements’ or power toys. Some of them can be found in Scott Hanselman’s 2006 Ultimate Developer and Power Users Tool List or Windows or in Michael Murgolo’s article Script Elevation PowerToys for Windows Vista on the TechNet site. The newest one I’ve started using this month is the NotePad2 in context menu (from Scott’s list).
So without further ado, here is a list of seven utilities that I find useful:
VS.Net 2003 CMD Prompt Here and VS.Net 2005 CMD Prompt Here
If you use the command line with .Net 1.1 or .Net 2.0 applications and don’t have these .inf files installed – these will save you quite a bit of typing (therefore – quite a bit of time). Since finding Mike Gunderloy’s .inf file for VS.Net 2003 several years ago, I’ve been using it (and the 2005 update) so often I don’t even think about it … until I get on a production machine that doesn’t have them – then I notice how much I use them.
Where you can find the utility:
VS.Net 2003 - Mike Gunderloy - VS.NET Command Prompt Here
VS.Net 2005 - My 2005 upgrade of Mike’s VS.Net 2003 INF file - VS.Net 2005 CMD Here
Scott Hanselman also has his versions on his list Scott Hanselman’s 2006 Ultimate Developer and Power Users Tool List or Windows or on his blog entry Visual Studio Command Prompt Here and Search Unknown File Extensions
I haven’t used Scott’s but I’m sure they are just as good. To install the .inf file all you need to do is download it, right click on it and choose install.
Note: You’ll need to install it as a user that has rights to edit the registry (either via Aaron Margosis’ MakeMeAdmin.cmd script or if on Vista just choose install and then you’ll be prompted for the admin user’s password).
Figure 1 - VS.Net 2005 CMD Prompt Here
Once you’ve got the inf file installed, go to Windows Explorer and right click on a folder, you now will get the choice to now open a command prompt with the current directory set to the one you just clicked on with all the proper VS.Net items in the path for you (Figure 1) … very handy!
CMD Prompt Here as Administrator
This utility is similar to the VS.Net CMD Prompt Here, but the purpose is slightly different -this one is good for when you need to run a script as administrator. If you haven’t read Michael Murgolo’s article Script Elevation PowerToys for Windows Vista, you should read it, it talks about this script and several others that are similar in nature and very useful.
This is also an .inf file, and once installed will add a new item to the context menu in Windows Explorer. When you right click on a directory and choose the CMD Prompt Here as Administrator item you will first be prompted for the administrator password, then a command session will open with the current directory set to the one you just right clicked on. You can see this item in the context menu shown in Figure 1 above.
Where you can find the utility:
Michael Murgolo’s article Script Elevation PowerToys for Windows Vista
I use to use Aaron Margosis’ MakeMeAdmin.cmd script all the time, but since I found Michael’s article and code, I’ve noticed that this utility is usually faster for what I want to do.
PowerShell Prompt Here
As I’m sure you can guess, this utility is just like the two previous utilities except it opens up a PowerShell session instead of the normal windows command shell. Figure 1 above also shows this utility on the context menu. There is also a PowerShell Prompt Here as Administrator item which is also included in Michael Murgolo’s download file.
Note: It may be obvious but this utility will require you to have PowerShell installed. You can download it from the PowerShell download page if you don’t have it.
Where you can find the utility:
Michael Murgolo’s article - Script Elevation PowerToys for Windows Vista
Currently I don’t use too many PowerShell scripts, but I have set a goal (Career goals for next 6 months) to start using and creating some, so I’m sure this will be more and ore useful.
Install As...
This utility is just a registry edit that I found in Dana Epp’s blog entry Useful registry hack to "Run As" MSI packages a couple of years ago. If you are running as non-admin most of the time (which you should be J) then this will help you when you need to install applications.
Michael Murgolo’s code download also has an ElevateMSI script that will supposedly do the same thing – plus Msi.Patches. You might want to check out both to see what works best for you. I personally don’t install many msi patches so I still use Dana’s original registry edits only.
Where you can find the utility:
Dana Epp’s - Useful registry hack to "Run As" MSI Packages
InstallAs reg file - InstallAs.reg a file with Dana’s registry changes scripted.
Michael Murgolo’s article - Script Elevation PowerToys for Windows Vista
Figure 2 – Install as … context menu item
Once you’ve edited the registry (either manually or by executing the .reg file), go to Windows Explorer and right click on a msi file and you’ll now see the Install as … context menu item (Figure 2).
Notepad2
Recently I’ve started using Notepad2 quite a bit (trying to phase out usage of TextPad). The one thing I find myself missing is the context menu item in Windows Explorer that TextPad installed to open a file in TextPad by just right clicking it. So I started looking to see if I could find someone who had already created a way to get Notepad2 added to the context menu in Windows Explorer … and believe it or not Google took me to a page that Scott Hansleman has linked on his utility list (guess I should have looked there first).
The idea behind this utility is to speed up the manner in which you can open a file in Notepad2 by just right clicking in Window Explorer and choose open in Notpad2 (can be seen in Figure 2 below the Install as...).
Where you can find the utility:
Notepad2 in Context Menu
Scott Hanselman’s 2006 Ultimate Developer and Power Users Tool List or Windows
Scott also has a link to another useful utility that will install Notepad2 as the default for View Source in Internet Explorer … something I’ve also started to use.
Browse with .NET Reflector
This utility, really is just something that was added to Lutz Roeder’s Reflector recently (version 5.0 I think) – a context menu item in Windows Explorer for opening an exe or dll in Reflector.
Where you can find the utility:
Get the latest version of Lutz Roeder’s Reflector or see if you have a version greater than 5.0 already.
To register, type the following in command prompt that has a path to the reflector.exe:
Reflector.exe /register
If you want to remove the context menu item, type the following:
Reflector.exe /unregister
Figure 3 – Browse with .NET Reflector context menu
Once you’ve registered Reflector by using the register switch, go to Windows Explorer and right click on an exe or dll and you’ll now see Browse with .NET Reflector on the context menu (Figure 3).
Copy Path Shell Extension
I’m a huge fan of SlickRun, so I’m always adding new magic words to it. In order to add a new magic word you need the path to the application that you want to create a word for – and the fastest way to do that is a shell extension. Besides creating a new magic word for SlickRun there are many other reasons you might need the complete path of a file(or portion of a path), like running scripts or tailing a log file, etc.
I’ve found (and used) a few shell extensions that add themselves to Windows Explorer’s context menu for the fastest way to get a complete path to a file. I have actually used all three of these utilities listed below (you only need one – since they do mostly the same thing – copy a file’s full path to the clipboard). Currently I use Ralph Arvesen’s extension because it provides parts of a path too (Figure 4).
Where you can find the utility:
Ralph Arvesen - Copy Path Shell Extension
Nick Carruthers - Copy Path Context Menu Extension
BJB, Inc - Copy Path to Clipboard Shell Extension 1.0
Figure 4 – Copy Path Shell Extension
With Ralph’s Copy Path Shell Extension, once you have it installed, go to Windows Explorer and right click on any file – you’ll now have a Copy Path context menu sub menu. If you look at the sub menu (which has a couple of options you can configure), you will see that you can copy the file’s path, directory, file name, etc. to the clipboard in just a click – very useful.
These utilities really do help save quite a bit of time. I’m going to guess that the majority of the readers of this entry have at least one of these utilities already installed, but if not then you probably can use at least one of them. One important keyboard short-cut to remember to help these utilities be even more useful is the Windows Key + E – which will launch Windows Explorer. I hope you find one of these utilities will help you in your every day development life, they certainly have mine.