Re: Installing Multiple Copies of a Service
- From: "Bryan Phillips" <bphillips@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Oct 2006 20:05:09 +0000
The best way to install a windows service initially is to use a VS.Net setup project to create an MSI file. Once you add an installer to the Windows Service project (by right-clicking the service file and selecting "Add Installer"), the setup project will properly configure the service in your environment.
Afterwards, you can just replace the executable and config files in place as long as you stop the Windows Service beforehand.
The key to a simple windows service is simplicity. I create a service file that contains only a timer which is configured started in the OnStart method and stopped in the OnStop method. I use the event handler for the timer to call a method that encapsulates the business logic and subsequent calls. This allows you to use a WinForms app as a test harness.
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
"jctebo" <jctebo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:61520E2D-68A6-4901-A58E-2537B746CD6A@xxxxxxxxxxxxx:
Hi. I am having difficulties getting a service to work. I tested the service
using a windows application that has one button (simulating the start service
command). Everything works fine. The application works as intended. I then
copy and paste the code into a windows service application, and when I
install the service, it stops immediately after it has been started. I think
it could have to do with installing a service multiple times, because I am
installing the service that I installed before.
My code contains code from multiple namespaces, including a dll I imported
that we use here at Chevron for encryption.
What is the best practice for updating a windows service? (Should I just
replace exe where the service runs, run installutil.exe to uninstall and
re-install application?)
What is a good source for windows services written in vb.net?
Thanks for your help.
--
John C. Thibeaux II
Application Developer
Chevron Information Technology Company
.
- Prev by Date: Re: Crystal Report Error
- Next by Date: Re: Run 3rd party .exe installation with your .msi setup file
- Previous by thread: Re: Crystal Report Error
- Next by thread: Re: Run 3rd party .exe installation with your .msi setup file
- Index(es):
Relevant Pages
|