Installing a Windows Service

S

SiJP

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)
 
M

Michael Nemtsev

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
 
A

arthernan

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/micr...a513cbcb5d8/5b955850f68387ad#5b955850f68387ad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top