Programatically uninstall/install a service.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

How could I have a program uninstall a service and then install a newer
version of the same service? This assumes I've already got the files in the
appropriate directory to be able to install the new version of the service.

TIA - Jeff.
 
Hi,


| How could I have a program uninstall a service and then install a newer
| version of the same service? This assumes I've already got the files in
the
| appropriate directory to be able to install the new version of the
service.

There is an option tin the setup project template where you can check for a
previous version and just install the new over it. Did you try it?
 
Thanks but I need to do it programmatically. I have a program that is going
to check for updates on our server and if there is a newer version it will
download it, uninstall the current service and replace it with the new one.
 
Hi,

| Thanks but I need to do it programmatically. I have a program that is
going
| to check for updates on our server and if there is a newer version it will
| download it, uninstall the current service and replace it with the new
one.

I know there is a way of doing that in code, just that I do not know it,
take a look in the archives.

A workaround would be:
1- stop the service
2- copy the new files over the old one
3- restart the service


All the above actions are easily implemented in code
 

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

Back
Top