PDA

View Full Version : IIS Virtual Directory per component



rcy123
02-05-2003, 01:53 PM
Hi,

I want to create an ISX4 project that contains a web service that is an optional component. There are other components that can be installed that do not require the web service.

My problem is, I need to set a virtual directory for my web service only if the web service component is selected by the user for installation. Is this possible? What are my options?

Thanks in advance,
Ryan

Chandima
02-05-2003, 05:50 PM
I'm afraid this is not possible in Express. InstallShield Developer has a "Condition" property for IIS directories. You can use this to tell the setup to install the directory only if a particular feature is installed.

rcy123
02-05-2003, 06:55 PM
Thanks for confirming that it isn't possible, Chandima.

I have decided to use separate installers, one for the webservice stuff, and one for the core. Not ideal, but upgrading to IS Developer is not an option at this point.

The biggest problem I have with this solution is that the webservice depends on the core. Whats the cleanest way to "link" the two installers together? Currently, if a user tries to install the webservice, it will search for a file on disk from the core, to make sure the dependancies are met. A similar search is done by the core when uninstalling, to refuse to uninstall if it finds that the webservice is installed.

It basically works, but it seems a bit fragile. Do you have any suggestions?

(I suppose doing the virtual directory setup myself in a custom action is possible as well.)

Thanks again,
Ryan

Chandima
02-06-2003, 05:23 PM
I put in a feature request to be able to associate a feature with an IIS Root. I doubt it will be in the Service Pack though (which went public Beta today). BTW we added three new properties to the IIS Root:

Session Timeout
ASP Script Timeout
Authentication Methods (lets you configure basic, anonymous and windows authentication for the root)

As for you situation two setups would be the way to go. However, put a Custom Action or Launch Condition in the Web Services setup to install ONLY of the core setup is on the machine. If using a custom action you can use a DLL for this. Go to General Information view, select the "Use Add/Remove Programs" property, and press the hyperlink in it's help (that shows in the IDE). This will give you sample code.

If using a launch condition, go to the Requirements view and create a new search that searches for "DisplayName" in the following Registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}

GUID will be the ProductCode of your "Core" setup.