Solved

Uninstall Windows service

Posted on 2004-09-17
4
2,768 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

690 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