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,575 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
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…

808 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