Philip Hendry's Blog

December 9, 2009

Adding a Windows Explorer Context Menu for the Web Development Server

Filed under: Tip, Windows, Windows 7 — philiphendry @ 4:17 pm

I wanted to be able to launch a single folder – the results of an ASP.NET WebForms build – in a Web Development Server without having to run up Visual Studio. The result looks like this :

image

And the solution… add the following to the registry :

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\webdev]
@="Launch in WebDev Server"

[HKEY_CLASSES_ROOT\Directory\shell\webdev\command]
@="\"c:\\windows\\microsoft.net\\framework\\v2.0.50727\\WebDev.WebServer.exe\" /port:54321 /path:\"%V\""

I would like to change that so it uses %windir% instead of C:\Windows but I must have got the syntax wrong because Explorer wouldn’t recognise the command. I’d also like to add an option for .aspx files that launches the parent folder in WebDev then launches an explorer window for the selected aspx file.

One last thing… this isn’t launching the server with any elevated permissions. If that’s required then you’ll need a tool such as Wintellects Elevate command which can be downloaded with full C# source code.

May 30, 2008

Quick Application Launching in Windows (Vista and XP)

Filed under: Microsoft, Tip, Vista, Windows — philiphendry @ 7:41 am

Here’s a quick tip for launching applications with a simple keypress rather than having to hunt it down in the program files menus (although I really like the search facility in the Vista start menu!)

First up, I created a Keyboard Shortcuts folder in my program files folder and added shortcuts for each of the applications I want to launch from a keypress. I’ve also included the shortcut key I’ve assigned in the name for simple reference. It’s important to be able to track down which keys are assigned to which apps because you can re-assign the key without realising you’re overwriting a previous one. Here’s my shortcuts in the start menu…

image

Then it’s just a simple matter of assigning the keypress in the properties for each shortcut…

image

The compatibility tab also lets you run programs automatically as admin if that’s required.

The only issues I’ve noticed when I’ve done this is I’ve re-mapped a keypress that already exists in another application. This usually isn’t a problem if I choose a shortcut of CTRL + SHIFT + ALT (which is only two key presses on a keyboard – ALT GR and SHIFT) since that’s a pretty unusual shortcut for an application. But it just so happened at one point that Visual Studio on my machine had assigned a keypress of CTRL + SHIFT + ALT + E which meant that the one I had defined took priority!

Blog at WordPress.com.