Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,635 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
[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
  • 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

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

Ever wondered why Windows 8 and 10 don't seem to accept your GPO-based software deployment while Windows 7 does? Read on.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on 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…

705 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