With most services you can just replace the exe, of course it has to be
stopped to do this (whihc you can automate) - but you dont typically have to
remove the service entry.
--
Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"UJ" <fr**@nowhere.com> wrote in message
news:uX**************@TK2MSFTNGP14.phx.gbl...
I have a program that will upgrade a service automatically. If the service
already exists, it will delete the service and then reinstall it through
code. To delete the service I'm using the DeleteService command which marks
the service as disabled but the service doesn't disappear until the program
shuts down. I've read on the web that it won't disappear until all
connections to the service manager have been closed. I close all my
connections yet it still is there until I close the program.
1. So I have two questions - does anybody know how to delete the service
and have it disappear immediately?
2. If I have a service and am upgrading it, do I need to remove it and
re-install it or can I just replace the executable?
TIA - Jeff.