Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Uninstall Windows service

Posted on 2004-09-17
4
Medium Priority
?
2,920 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 750 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 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