Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installing a second instance of a service


2 replies to this topic

Mariscal

Mariscal
  • Full Members
  • 50 posts

Posted 27 February 2007 - 00:01

Hello All,

I'm trying to incorporate in my install script the ability to install more than one instance of a service on a single machine. The idea is that the user will be prompted to name the new instance if they choose to install another (which will create a similarly named folder), files will be installed into the newly-created folder, and then the new instance of the service will be registered in Service Control Manager.

What I'm trying to figure out is how to get the installation files from the File Groups to be installed in the new directory, since the File Groups are set up to install their contents into the folder(s) of the default installation.

Is it possible to do this, and if so, any ideas on how I can go about it?

Thanks very much in advance for any advice...

samsquared

samsquared
  • Full Members
  • 18 posts

Posted 20 March 2007 - 15:41

There are several things you can try. Could you just use an XCopyFile to copy files from the default location? I set up an install where the target folder was SUPPORTDIR and I just copied files from there to the one or multiple locations desired by the user. I'd want to do some testing on this to see what happens during an uninstall.

Another option (if it wouldn't make the cab files too big and the user can elect only a limited number of additional locations) is to create Components and File Groups for the additional locations which would look exactly like the default one. Make the component(s) not visible and use ComponentSetData to set them as being selected when using multiple locations. Use a script-defined folder as the target for these other file groups (one or more) and set them using ComponentSetTarget before data is moved. Uninstall for this scenario should be no problem.

Mariscal

Mariscal
  • Full Members
  • 50 posts

Posted 17 April 2007 - 22:39

Hi,

Thanks for the suggestions. I've hit upon something similar to your second suggestion, and am just trying to work out some of the kinks in order to pull it off.

Thanks again...