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: Installing .NET Windows / NT Service
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
‎Oct 21, 2008
01:37 PM
Installing .NET Windows / NT Service
Hi,
I am new to these forums. I have built a Windows Service in CSharp and want to install and start the service as part of my install.
I use to use Installshield Express, and made a small app that the installer would call that simply installed the service and started it for me.
Now I upgraded to 2009 Pro and beleive that the installer can register and start the service for me. I have tried to label the assembly as 'installer class' in the Component section, and also made a NT Service Controller to start the service. The problem is that the service is not being registered in the first place.
Could someone provide guidance?!
Thansk is advance!
James
I am new to these forums. I have built a Windows Service in CSharp and want to install and start the service as part of my install.
I use to use Installshield Express, and made a small app that the installer would call that simply installed the service and started it for me.
Now I upgraded to 2009 Pro and beleive that the installer can register and start the service for me. I have tried to label the assembly as 'installer class' in the Component section, and also made a NT Service Controller to start the service. The problem is that the service is not being registered in the first place.
Could someone provide guidance?!
Thansk is advance!
James
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2008
01:53 PM
You are most wise. 🙂
http://blog.deploymentengineering.com/2006/07/msi-vs-net.html
Get rid of the Installer class and instead look at the component advanced settings and you'll see places to describe the service installation and control behavior.
Remember to join the two based on the internal service name and that the service base image is the EXE key-file of the component.
http://blog.deploymentengineering.com/2006/07/msi-vs-net.html
Get rid of the Installer class and instead look at the component advanced settings and you'll see places to describe the service installation and control behavior.
Remember to join the two based on the internal service name and that the service base image is the EXE key-file of the component.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2008
02:22 PM
Thanks Chris - away with the installer class it is! I'll try out adding the service through the advanced settings as suggested.
Thanks again
James
Thanks again
James
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2008
02:29 PM
One gotcha to watch out for and one tip.
The standard action that publishes assemblies to the GAC doesn't do it until after it tries to start services. Yes, ugly, I know. Tell it to Microsoft. 🙂
So don't reference GAC that you are deploying in your service. Install it privatly instead.
Now for a tip... first time you wire this up, tell it to create the service and start manually... don't wire up any control events. First establish that you have everything you need in place ( assemblies, app.config settings, whatever... ) and that you can deploy and start manually on a clean machine. Then set it to automatic and wire in your start commands.
This will save you a lot of pain trying to debug/profile if you encounter problems.
The standard action that publishes assemblies to the GAC doesn't do it until after it tries to start services. Yes, ugly, I know. Tell it to Microsoft. 🙂
So don't reference GAC that you are deploying in your service. Install it privatly instead.
Now for a tip... first time you wire this up, tell it to create the service and start manually... don't wire up any control events. First establish that you have everything you need in place ( assemblies, app.config settings, whatever... ) and that you can deploy and start manually on a clean machine. Then set it to automatic and wire in your start commands.
This will save you a lot of pain trying to debug/profile if you encounter problems.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2008
03:00 PM
Since you moved from IS Express to IS Pro, you will find out that there are a lot of ways to do stuff. Either in MSI projects types and Install Shield script project types. I personally like Install Shield script projects. For simple installations, MSI projects are really good, but IS script projects allows more flexibility. For example, you can us script code to Stop, Start, Remove, and Add services in code. You may be interested in looking into:
ServiceAddService
ServiceRemoveService
ServiceStartService
ServiceStopService
My best suggestion to you is try stuff. Find out what works for you and your installation.
ServiceAddService
ServiceRemoveService
ServiceStartService
ServiceStopService
My best suggestion to you is try stuff. Find out what works for you and your installation.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2008
03:28 PM
You can do the same thing in MSI ( those functions are InstallScript functions that can be used in an InstallScript custom action in a Basic MSI project ) but the general difference is in MSI you try to avoid scripting since you are reinventing the wheel.
Yes, you accept a certain amount of rigidness in MSI but generally it means more reliable installs that are developed faster and require less testing.
Yes, you accept a certain amount of rigidness in MSI but generally it means more reliable installs that are developed faster and require less testing.