Solved

Uninstall Windows service

Posted on 2004-09-17
4
2,615 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now