Solved

Uninstall Windows service

Posted on 2004-09-17
4
2,673 Views
Last Modified: 2007-12-19
Hi!

I made a windows service in C#. I add an installer class and the windows service worked well.

I was installing and uninstalling my window service and every thing was good. Then I added a description in the installer class.

I ran installutil to uninstall my service, I thought that the service was uninstalled and replace my old .exe service for the new one.

When i tried to install again the service it showed me this error message:
 - The specified service has been marked for deletion.

And I could't install the service again .

The problem is that now,when I run installutil.exe /u it shows me this error message:
 -The savedState dictionary contains inconsistent data and might have been corrupted.

So I'm not able to install or uninstall the service.
There is a way to delete manually the service. Maybe editing the registry with regedit and/or deleting some files.

I'll thanks any help

Jorge

0
Comment
Question by:jorgearias
4 Comments
 
LVL 5

Expert Comment

by:tomasX2
ID: 12088957
have you tried a reboot?
setting the service on disabled before might help.
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12091071
you need to have the old service to uninstall it. without rebooting

Or you find it in regitry and delete the entry manually
http://www.codeproject.com/csharp/scheduler.asp?df=100&forumid=4150&exp=0&select=767085
0
 
LVL 4

Expert Comment

by:Farshid-Zaker
ID: 12091322
you can create a windows service using Visual C++ wizards. select ATL projects and then Service. You can edit service name in project resource files.
the generated service can be installed, and then uninstalled. so, the only thing you should to do is changing the name of the service to your corrupted service. then in command prompt, install and then uninstall the service. if there is any problem, ask me to provide you with detail steps.

FARSHID
0
 
LVL 15

Accepted Solution

by:
deepaknet earned 250 total points
ID: 12099945
Hi:

The message "The specified service has been marked for deletion." indicates on subsequent server reboot, the service will be removed.

You can also use sc.exe (or its GUI counterpart) to remove the service, which installutil.exe can not remove, if you miss the assembly on hand.

Deepak
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question