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.

July 7, 2009

Adding a Boot Menu Option for a VHD in Windows 7

Filed under: Windows 7 — philiphendry @ 8:01 pm

Having already created and installed a a VHD using VirtualPC I now wanted to use the great new feature available in both Windows 7 and Windows Server 2008 which allows you to boot the machine from the VHD instead of the physical partition. In order to achieve this I just had to run a few commands at a command prompt running as admin:

C:\Windows\system32>bcdedit /copy {current} /d "Windows 7 Visual Studio 2010 VHD"
The entry was successfully copied to {fc7d293a-666d-11de-bd7a-001bdc0fdad5}.

C:\Windows\system32>bcdedit /set {fc7d293a-666d-11de-bd7a-001bdc0fdad5} osdevice vhd=[c:]\VMs\Windows7VisualStudio10.vhd
The operation completed successfully.

The first command returns a GUID which must be copied into the second command but that’s all that’s required to add a new entry to the boot menu (which in Windows 7 is no longer a boot.ini file but a ‘mini-database’.)

Installing Windows XP Compatibility in Windows 7 Beta

Filed under: Windows 7 — philiphendry @ 7:08 pm

There’s a specific Microsoft page where you can download the beta of Virtual PC and Windows XP Mode which will provide you a full virtualised Windows XP environment in Windows 7 providing the best compatibility ever!

However, I didn’t think my Dell Inspiron 6400 was that old but it appears it doesn’t support Intel VT (Virtualization Technology) and the Virtual PC Beta annoyingly requires it. I used a tool called securable which told me pretty clearly where I stood :

image

As a side note, the site that offered the securable tool also provides the neat tool called Shields Up! which can test the effectiveness of your internet security.

I managed to work around the issue of no virtualisation by running the Windows XP VHD from Virtual PC 2007 SP1 – however, the Virtual PC beta seemed to break my installation of 2007 so I had to uninstall both and re-install 2007.

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.