cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shawny
Level 3

Need Help: Multiple Instance Websites

Hello all,
I'm BRAND NEW to installers in general and have only been using InstallShield for a week or so. That being said I would LOVE some help using InstallShield 2009 Premiere.

I've been tasked with creating an installer that will have the ability to create multiple instances of a website in IIS. The reason for this is that I have a .Net website project that is nearly identical for multiple clients except for some entries in the web.config. These differences are what differentiate each client, so each client requires the same functionality, but each with their own copy of the project, own host headers, etc. Im using IIS 6. Here is how it's supposed to work in theory:

FIRST INSTALL

1. When the installer is first run, there will be a dialog that asks the user what the client name is and asks for a value that will be inserted into the client's web.config.
2. The client name is appended to the project so that I can differentiate each client in the ARP (so it would read Project_ClientA, Project_ClientB, etc) and the directory structure is created in my C:/Program Files/My Company/My Project/Client name. I've got this piece to work.
3. A website and unique application pool is created in IIS that displays the project_ClientName that was entered in step 2. (In order to get this to work, I had to change the Site Number in the website property. I associated the website with a component because I dont want to have to use a virtual directory.)
4. The website is set to point at the directory created in step 2.
5.
6. End initial install.

SUBSEQUENT INSTALLS

1. The InstallShield Multiple instance window comes up asking whether the user wants a new instance or to modify an existing instance.
2. For new instance, the dialog from step 1 in First Install comes up asking again for client name and web.config value. And the rest of First Install Sequence is run creating a new website and app pool in IIS only with the new client name.
3. For modify already installed instance, the maintenance dialog pops up, then the dialog from step #1 in First install shows allowing the installer to change the values of the web.config and client name.
4. Changes are processed
5. All is well in the world

I have already created the multiple instance transforms in the release tab and the multi instance window works. The files are copied correctly for multiple instances into my file structure C:/Program Files/My Company/My Project/ClientA... ClientB... etc. The multiple instance are installed correctly to ARP showing ProjectName_ClientA...Project_ClientB...etc. The application pools are created correctly Project_AP_ClientA...Project_AP_ClientB...etc. The copies of the files are created in the program files dir correctly.

The problem is that in IIS, I am only seeing the website that was created on the FIRST execution of the installer and only if I change the Site Number from the default value of 0. (If I leave the default value of 0, the website node is not created at all in IIS). I've tried to add a SiteNumber property in the instance transform to modify the site number, but that didn't do anything.

I've been trying to get this to work for several weeks now without success and I feel that I simply dont know enough about InstallShield (or the windows installer) to make it happen.

If anyone can offer any help, I would be appreciative.

Here are my main 2 questions:
1. How do I create multiple website instances in IIS using InstallShield?
2. Where do I insert my custom dialog(that asks client name and web.config value) in order to have it run after the multiple instance dialog (I cant find the multi instance dialog anywhere, but it does show up when I run the installer subsequent times)

Thank you a thousand times over!!!!!!
Labels (1)
0 Kudos
(6) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If you use a property in the Site Number field, and set the property's value to INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER, each time the component containing the website is installed, a site number will be located for the website, which should allow it to install for each product instance.

The multi-instance dialog is displayed by setup.exe. To be able to sequence any dialogs, they need to be in your MSI package. You could insert your dialog directly into the install UI sequence (from the Custom Actions/Sequences view) and sequence all dialogs after it, and remove InstallWelcome as the first-time install starting dialog.
0 Kudos
shawny
Level 3

You are my hero!

Do I need to put the value of the property as {INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER} or without the {}?

Sorry, Im just super new
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

When adding your property to the Property Manager, set the value of the property to INSTALLSHIELD_IIS_NEXT_NEW_SITE_NUMBER as-is (no other characters are needed). In the Site Number field in your website, reference the property as [PROPERTYNAME].
0 Kudos
shawny
Level 3

You sir.... are a COMPLETE BADA$$!!!! It worked! Weeks of phone calls with tech support solved with one piece of information.

I owe you a pint or three.
0 Kudos
racoon82nz
Level 4

Hi! I'm also stuck, please help!!

I couldn't get the multi-instance dialog displayed during setup. I have tested this on windows 2003 server, but the multi-instance dialog is not displayed...
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If you have added multiple instances of your product in the Releases view, and you are building a setup.exe with your release, you should see the multi-instance dialog after installing the built setup once on a target machine. The dialog allows for maintaining an existing instance or installing a new one. Note this information applies to Basic MSI projects.
0 Kudos