Click here to Skip to main content
Licence CPOL
First Posted 1 Sep 2008
Views 8,230
Downloads 56
Bookmarked 5 times

Change Local IIS Home Path from Explorer Context Menu

By | 1 Sep 2008 | Article
Change local IIS home path from explorer context menu

Introduction

First let me say that this is not an article about the System.DirectoryService namespace or how to fiddle with the registry. It is basically a very simple utility application that I put together to make my life just a little bit easier.

Background

On a typical day, I will change my local IIS home directory several times so that I can run different web applications. So I put this application together so that I can simply right click on a folder, select an option from explorer's context menu and have that folder set as the home directory in my local IIS.

Using the Code

To use this application, download the source code from the link above and compile it. I have created it using Visual Studio 2008 so if you are using Visual Studio 2005, just create a new empty solution and add the IISHomeClient.csproj project. You will also need to either manually add a key to the registry or use the included config.reg file. You will need to open the config.reg file and type in the path to the IISHomeClient.exe (see example below). Once you have added the path to the .exe, save the config.reg file and then simply double click the config.reg file and press Yes to confirm.

[HKEY_CLASSES_ROOT\Folder\shell\Set as IIS Home]

[HKEY_CLASSES_ROOT\Folder\shell\Set as IIS Home\command] 
@="C:\\[YOUR PATH]\\IISHomeClient.exe %1"

Points of Interest

I use this on Windows XP (sp3). This doesn't work for shortcuts, so you will need to right-click on an actual folder.

History

  • 1st September, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Sean Rock

Web Developer

United Kingdom United Kingdom

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralIt helps PinmemberVipul1234561:11 7 Aug '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 1 Sep 2008
Article Copyright 2008 by Sean Rock
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid