Microsoft Windows XP Pro has built in Web Server called Internet Information Service (IIS). In order to use the feature, make sure your IIS service already activated:
- Right click on My Computer, choose Manage
- Expand tree Services and Applications
- If you see Internet Information Services item, then your IIS service is already installed
IIS Installation
To install IIS Service, follow these instructions to activate it:
- Go to Control Panel > Add or Remove Programs
- Open Add/Remove Windows Components, tick on Internet Information Services (IIS)
- Click Next button until it finished

Create a Virtual Server
Check on the Web Sites folder in IIS management console, you may see only “Default Web Site”. If you are a web developer, sometime you need to have another separate web servers. Of course you can also mount a virtual directory to the server, but it will never have root path.
Now you can add another virtual servers which have it’s own root path. IIS have a collection of scripts for administrative tasks such as creating another virtual servers. You can found the scripts on C:\Inetpub\AdminScripts, to create a virtual server we can use script file adsutil.vbs. For details, follow instructions below:
- Open command prompt, click on Start menu > Run, type cmd and press enter
- Go to the scripts folder, type “cd \Inetpub\AdminScripts”
- Create new virtual server and copy all the necessary settings using these commands
cscript adsutil.vbs create_vserv W3SVC/2 cscript adsutil.vbs copy W3SVC/1 W3SVC/2
- Now you should create a folder for the web’s home directory, for example
C:\Inetpub\wwwroot_secondary - Go back to IIS Management Console, you should see another Web inside Web Sites folder
- If you see red icon for the new web, don’t worry it’s normal, Windows tried to start the second web, unfortunately you can only run one at a time
- Rename it, right click on Second web, choose rename, type “Secondary Web” for example
Switch The Virtual Server
To switch the running server, you can make batch file running these command:
enable_second_server.bat
cscript C:\Inetpub\AdminScripts\adsutil.vbs STOP_SERVER W3SVC/1
cscript C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/2
enable_first_server.bat
cscript C:\Inetpub\AdminScripts\adsutil.vbs STOP_SERVER W3SVC/2
cscript C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1
Delete a Virtual Server
To delete you previously created, use this command:
C:\Inetpub\AdminScripts>cscript adsutil.vbs delete W3SVC/2
No related posts.
Tags: adminscript, iis, vbscript, virtual server