Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

On Windows 8>> Windows Service app created with visual studio >> after install, and trying to stop getting  error 1061.

Posted on 2014-01-08
5
Medium Priority
?
1,653 Views
Last Modified: 2014-01-11
Hi,
I have strange issue with created windows service application.
Basic information:
- created with Visual Studio 2012
- using command installutil.exe to install app

Steps:
- app path C:\Program Files (x86)\Test\Service.exe
- with cmd installutil.exe app is succesfull installed of service >> and not problem start it
- because of app updates I want to uinstall service >> 
1.Error:
Windows Could not stop the service on Local Computer
2. Error:
I open services with RunAsAdmin >> press stop, and get Error 1061

- then I use installutil.exe /u command >> status; The uinstall has completed.
- opening again services, but service is still there, and also not able to manually stop it

- then I have try to install, and uninstall service on Windows 7, and WORKS without issues.

Need really urgent help from someone. Thanks in advance for help!
0
Comment
Question by:dejandejanovic
  • 3
  • 2
5 Comments
 

Author Comment

by:dejandejanovic
ID: 39766214
I have forgot to mention important thing: after all points written in first post >> when restarting PC service is then successful removed. But this is pain in my a.. from developer perspectives.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 39766234
This might be caused by discrepancies between one computer and the other.

I had that happen a few months ago when moving a service from one computer to another. After a lot of work, I found out that the drives mapping on the 2 computers was different, which triggered an error in the services that went into a suspend status. A service does not accept commands when in a suspend state.

You might try to change the startup type of the service to Disabled if it accepts it. That will enable you to reboot with a stopped service and then uninstall it.

Rebooting in Safe Mode might also enables you to remove it.

As for correcting the problem, if you do not have much code in there, look at it and try to find things that could be different between Windows 7 and Windows 8 such as the fact that a clean install of Windows 8 does not have a C:\Users\<UserName>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs as Windows 7 has.

If you can, install Visual Studio on the Windows 8 computer in order to be able to run the service in debugging mod and see if there is a problem there.
0
 

Author Comment

by:dejandejanovic
ID: 39766274
Thanks for quick reply.
I have found closer solution, but still not satisfy for me.
With task manager I can kill process, and service is stopped.
I have also comment entire code behind of service application.

But, still leave me an open question why services.msc does not stopped process/service?
0
 
LVL 40
ID: 39766334
Killing a process is not the same thing as stopping it.

Killing a process has been designed specifically to get rid of stuff that does not want to go away normally from the system.

Stopping a process normally triggers events that enables the process to clean up behind itself. If the process is stuck somewhere, it cannot process these events and the process does not stop.

Killing a process disregards this mechanism and simply stop the execution of the process and tries to liberate the resources it was holding.
0
 

Author Closing Comment

by:dejandejanovic
ID: 39773868
Actual, I was installing service from C\:Program Files.
Thanks, I think it a Windows 8 bug, as on Windows 7 no problems removing service. So, I will report, and open thread in MSDN.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.
Suggested Courses

916 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