I have created a windows service, and can happily install it and run
it, but this involves manually running the InstallUtil command line
tool for each installation.

Can this not be automated to run from within my MSI?

Thanks

(vb.net, vs.net 2003, .net 1.1, windows xp sp2)

Re: Installing a Windows Service by Michael

Michael
Thu May 11 11:43:56 CDT 2006

Hello SiJP,

Use ServiceInstaller class for this. See MSDN for more info

S> I have created a windows service, and can happily install it and run
S> it, but this involves manually running the InstallUtil command line
S> tool for each installation.
S>
S> Can this not be automated to run from within my MSI?
S>
S> Thanks
S>
S> (vb.net, vs.net 2003, .net 1.1, windows xp sp2)
S>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche



Re: Installing a Windows Service by arthernan

arthernan
Thu May 11 14:15:37 CDT 2006

>Can this not be automated to run from within my MSI?

Yes it can, in VS 2005 it's actually pretty straight forward. Here is
the link I found

http://support.microsoft.com/kb/317421/en-us

It's actually a good article; Then the problem is debugging the service
because it needs to be running to be debugged. So you almost need to
stop the service, replace the executable, and restart the service.
Which can be pretty tedious and error prone when you debug. I made
another post on that.


http://groups.google.com/group/microsoft.public.dotnet.framework/browse_frm/thread/06bf8a513cbcb5d8/5b955850f68387ad#5b955850f68387ad