PDA

View Full Version : Conditionally install Virtual Dirs



jweber
03-24-2006, 11:02 AM
Can anyone point out the best plan of attack for the following.

I need to conditionally install 3 virtual directories into IIS. The condition will be based on a CheckBox. Additionally, I need the virtual directories to contain files not contained in the installation. They will be external.

Thanks

J

wjoconnor
03-24-2006, 11:38 AM
When you create a Virtual Directory in IS, it automatically creates a component associated with it. In my little test, it was named "WebServiceExtensionComponent". Your checkbox will need to be associated with a public property. A public property is denoted by having all capital letters in its name. For example, you could name the property INSTALLWEBSERVICES and the user's choice will be stored there (a 1 or a 0).
In the WebServiceExtensionComponent, set its condition to:

INSTALLWEBSERVICES = 1

Now, when the user installs your application, the web service will only be created when they specifically ask for it.

Now, as for the Virtual Server, you can specify the home directory for the website to be whatever you want. You probably want to specify this to be a property and then modify the property to point to whatever set of files you want to use for your site.

jweber
03-24-2006, 01:26 PM
K, that makes sense. Next Simple Question...

When I run the installation I get my virtual dirs created under the default website and not the website I created in the IIS portion of installshield. Does the website have to already exist in IIS? That wouldnt make much sense....

Thanks again,

J

wjoconnor
03-24-2006, 01:32 PM
When I run the installation I get my virtual dirs created under the default website and not the website I created in the IIS portion of installshield. Does the website have to already exist in IIS? That wouldnt make much sense....

I'm not 100% certain what you mean by this. Do you mean that, after the website is installed, you have to go to "http://localhost/MyVirtualDirectoryName" instead of just to "http://localhost/"?

jweber
03-24-2006, 01:36 PM
No the problem was that my virtual directories were being created in the default web site instead of the website that I specified in installshield. Figured it out tho from this thread...

http://community.macrovision.com/showthread.php?t=153561&goto=nextnewest

Thanks much for the help.