This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Install the same service multiple times under different names
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 27, 2012
08:29 AM
Install the same service multiple times under different names
Hi,
I am using the InstallShield 2012 Premier Edition. I have a Basic MSI project where I install a service.
The user can set how the service should be named with a custom dialog.
Now I want to install the service multiple times under different names by starting the same setup again.
How can I accomplish this task?
Thanks in advance
Christoph
I am using the InstallShield 2012 Premier Edition. I have a Basic MSI project where I install a service.
The user can set how the service should be named with a custom dialog.
Now I want to install the service multiple times under different names by starting the same setup again.
How can I accomplish this task?
Thanks in advance
Christoph
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2012
04:31 AM
How can you install a Basic MSI setup multiple times? An answer to this question would solve my problem I think.
EDIT: I have managed to install a Basic MSI setup multiple times by adding instances in the "Multiple Instances" tab.
But now I am still having problems installing the windows service multiple times. It seems that the service always gets overwritten by the latest installation.
What makes the windows service unique? Is it the "Component Code" of the component or the "Key Name" of the windows service?
Thanks in advance
Christoph
EDIT: I have managed to install a Basic MSI setup multiple times by adding instances in the "Multiple Instances" tab.
But now I am still having problems installing the windows service multiple times. It seems that the service always gets overwritten by the latest installation.
What makes the windows service unique? Is it the "Component Code" of the component or the "Key Name" of the windows service?
Thanks in advance
Christoph
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 27, 2013
08:51 AM
Some of this might be of interest to you if you want to avoid transforms (finite number of instances) and just let the installation run like new every time you launch it. Keep in mind that this solution would require you to come up with your own way to uninstall:
Adding and Removing an Application and Leaving No Trace in the Registry
What makes a windows service unique is the service name. This is quite literally a namespace issue. If you want your install to be super dynamic, you could write a custom action that modifies the msi at runtime. You would want to maybe create a loop to query the SCM for ServiceName, and when you find a value for n that is not already in use, change the name of the service in the ServiceInstall table to that name, and then continue as normal.
That said, on each of these installations, are you installing a new set of files, or is this just to create multiple instances of a service from the exact same set of files? If it is the latter, then I think you're going about it all wrong. Adding instances of the service is something that could more easily be integrated in a GUI provided by your product rather than the installation itself. So I would say, install the product with the initial copy of the service. Write a quick little gui or command line app that creates new copies of the service. I've seen this done inside the service executable itself, calling it with a "--install" argument tells it to find a unique name for itself, and create a new service instance. If this is a .NET service, maybe look into TopShelf. That's what the devs use here.
The trick then is to make deleting one service delete all the other ones. I'll leave that up to you.
I hope I have given you enough information to solve the problem a couple different ways.
Good luck!
Adding and Removing an Application and Leaving No Trace in the Registry
What makes a windows service unique is the service name. This is quite literally a namespace issue. If you want your install to be super dynamic, you could write a custom action that modifies the msi at runtime. You would want to maybe create a loop to query the SCM for ServiceName
That said, on each of these installations, are you installing a new set of files, or is this just to create multiple instances of a service from the exact same set of files? If it is the latter, then I think you're going about it all wrong. Adding instances of the service is something that could more easily be integrated in a GUI provided by your product rather than the installation itself. So I would say, install the product with the initial copy of the service. Write a quick little gui or command line app that creates new copies of the service. I've seen this done inside the service executable itself, calling it with a "--install" argument tells it to find a unique name for itself, and create a new service instance. If this is a .NET service, maybe look into TopShelf. That's what the devs use here.
The trick then is to make deleting one service delete all the other ones. I'll leave that up to you.
I hope I have given you enough information to solve the problem a couple different ways.
Good luck!