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,583 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp web application 3 35
Making exceptions for ValidationAttribute 2 23
Need help with a query 3 36
VB.net Excel VSTO Add-in version compatability 2 12
With Windows evolving further, the built-in protective mechanisms get better and better. Still, Microsoft is not very good at introducing those to the technical community. This article is about a new bitlocker functionality that could revolutionize …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

679 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