Export (0) Print
Expand All

Renaming Virtual Directories

Updated: August 22, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

In IIS 6.0, you cannot use IIS Manager to rename a virtual directory. Instead, you can rename a virtual directory by editing the MetaBase.xml file using a text editor, such as Microsoft Notepad.

Always back up the metabase before editing MetaBase.xml. For information about backing up the metabase, see Backing Up and Restoring the Metabase in IIS 6.0.

You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exe ScriptName (include the script's full path and any parameters).


To rename a virtual directory by using Notepad
  1. Open MetaBase.xml in Notepad. The default location for MetaBase.xml is C:\Windows\System32\Inetsrv.

  2. On the Edit menu, click Find, and then locate the virtual directory name that you want to change.

  3. Replace the current virtual directory name with a new name.

  4. Close the MetaBase.xml file and when prompted, save the changes.

  5. In IIS Manager, right-click the local computer, and then select All Tasks.

  6. On the All Tasks menu, click Save Configuration to Disk

When you rename a newly created virtual directory, it takes at least two minutes for the change to appear in IIS Manager if no other changes are pending. To see the change immediately in IIS Manager, close and then reopen IIS Manager.

Community Additions

© 2016 Microsoft