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
1,554 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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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
Comment Utility
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 improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
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.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

743 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

21 Experts available now in Live!

Get 1:1 Help Now