469,275 Members | 1,497 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Windows Service uninstall

I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.
Jul 21 '05 #1
6 8698
Did you reboot your computer after uninstalling?

"tuuky" <tu***@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one. However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.

Jul 21 '05 #2
Possibly the initial uninstall failed due to "old" service still running.

Services show under CP's Windows Services when there are registry entries
for it still.

I'd try something like:

Make sure the old one isn't still running
Reinstall the old on top of the old
Uninstall the old
Reinstall the new

Worst case: Hunt down the registry entries for the service with regedit...

Services typically install and uninstall just fine...

"tuuky" wrote:
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.

Jul 21 '05 #3
I did and it was still there.

"Peter Rilling" wrote:
Did you reboot your computer after uninstalling?

"tuuky" <tu***@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the

service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new

one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.


Jul 21 '05 #4
That's just what I had to do.
I found the key in the registry and deleted it.
I had to reboot after that, but the service was gone and I was able to
reinstall the new version.

From now on, I'm just going to overwrite the .exe instead of reinstalling
the service.

Thanks for your help.

"Ben Solomon" wrote:
Possibly the initial uninstall failed due to "old" service still running.

Services show under CP's Windows Services when there are registry entries
for it still.

I'd try something like:

Make sure the old one isn't still running
Reinstall the old on top of the old
Uninstall the old
Reinstall the new

Worst case: Hunt down the registry entries for the service with regedit...

Services typically install and uninstall just fine...

"tuuky" wrote:
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.

Jul 21 '05 #5
PHS
Another, more reliable fix is to right click on your installer project file
in .net. Notice the product code in the properties window? Click on the ...
button and then click New Code. It generates a new guid and when you rebuild
the project you'll be able to reinstall it. I often shag my installer by
making lots of changes but I forget to uninstall first. This has saved my a$$
on many occasions. Otherwise, spin through the registry and wipe out the
obvious. There is a tool Microsoft make available that cleans up the
installer environment (I forget it's name). I've had mixed fortunes with it
though.

"tuuky" wrote:
That's just what I had to do.
I found the key in the registry and deleted it.
I had to reboot after that, but the service was gone and I was able to
reinstall the new version.

From now on, I'm just going to overwrite the .exe instead of reinstalling
the service.

Thanks for your help.

"Ben Solomon" wrote:
Possibly the initial uninstall failed due to "old" service still running.

Services show under CP's Windows Services when there are registry entries
for it still.

I'd try something like:

Make sure the old one isn't still running
Reinstall the old on top of the old
Uninstall the old
Reinstall the new

Worst case: Hunt down the registry entries for the service with regedit...

Services typically install and uninstall just fine...

"tuuky" wrote:
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.

Jul 21 '05 #6
JXT
Instead of using the Add/Remove programs, use the InstallUtils.exe. The /u
option is used to uninstall services. The InstallUtils.exe is a part of the
..NET Framework tool set, and it works great for installing/uninstalling
services. There are a ton of articles on the web on how to use it.

"tuuky" wrote:
I've created a Windows Service in C# and an installer project for it.

I installed the service using the packaged installer project and the service
was installed correctly and it runs fine.

I've since made some changes to this service.
I then proceded to uninstall it (Add/Remove Programs) to install the new one.
However, the service still shows under Services, but the .exe is gone.

I can't install the new version of the service, because the installer says
that the service is already installed.

Someone please help me get this mess straightened out.

Thanks.

Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jacobus Terhorst | last post: by
7 posts views Thread by Larry Bird | last post: by
6 posts views Thread by tuuky | last post: by
reply views Thread by =?Utf-8?B?c3VqaXRo?= | last post: by
1 post views Thread by kirk.quinbar | last post: by
3 posts views Thread by Claire | last post: by
5 posts views Thread by dm3281 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.