Creating IIS Virtual Directory
Posted on 2008-10-07
I am distributing a web-based application (Classic ASP) that require to create a virtual directory.
I have created a .bat file to do the following steps (I used Wizard's Apprentice to add gui to my .bat file):
1. Check for IIS presence (if yes setup will goto next step else will display a msg and exit).
2. Install SQL Express Unattended (with named instanse)
3. Install SQL SP2 if the OS is not Windows XP
4. Copy My aplication files to a C:\MyApp
5. Attached the database to SQL Server
6. Add IIS Virtual Directory to IIS to map C:\MyApp folder and enable "Parent Paths" option <=== This is the problem now ===>
The problem is:
I need a command line script to do the following:
1. Create a Virtual Directory (Example path: C:\MyApp)
2. enable "Allow Parent Paths" option.
It will be appriciated if the code will be compatible with both Windows XP (IIS 6) and Vista (IIS 7).
Note: I don't want to copy the aaplication files to inetpub\wwwroot, becuase I try it but the customer is still need to involve with settings of the Virtual Directoy.