none
Using SC.exe with PSEXEC returns 1060 error RRS feed

  • Question

  • Hi there,

    I have cleared the temp folder on the server where my windows service is running and when i try and use sc.exe \\SERVERNAME STOP SERVICENAME i get the 1060 error.

    By the way i am using command line to stop the service. I am also using the PSEXEC tool to stop the service on the remote server.

    Here is my code:

    psexec -accepteula \\THESERVER -e -s -u DOMAIN\testuser -p thepassword7 sc.exe \\THESERVER STOP ParisConnect;

    The error i  get is this:

    PsExec v2.11 - Execute processes remotely
    Copyright (C) 2001-2014 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    
    [SC] OpenService FAILED 1060:
    
    The specified service does not exist as an installed service
    
    sc.exe exited on THESERVER with error code 1060.


    I tried invoking a cmd.exe on the remote server to test connectivity and this worked. I was able to start the cmd.exe process.

    Any ideas why this error could be happening? The account i am currently using is part of the Administrators group on the server.

    Kind Regards,


    • Edited by IndusKing Wednesday, May 14, 2014 10:51 AM
    • Moved by Anna Cc Thursday, May 15, 2014 9:04 AM
    Wednesday, May 14, 2014 10:50 AM

Answers

  • you actually don't need to do both psexec and sc

    sc already supports doing remote service commands, it's the net command that doesn't support remote access

    Thursday, May 22, 2014 8:48 PM
  • was the service running? 

    ERROR_SERVICE_DOES_NOT_EXIST
    1060 (0x424)

    The specified service does not exist as an installed service.

    maybe you should query first whether the service is running or not, if the service runs then stop it.


    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

    Monday, May 26, 2014 8:29 AM

All replies

  • Hi,

    According to your description, you didn't post in a correct forum. I help move this case to Windows Server General Forum for better response.

    Thank you for your understanding!

    Best regards,

    Thursday, May 15, 2014 9:03 AM
  • Hi,

    Make sure you have the correct service name. A service can have a service name, and a display name which is different from the former.

    Did you use the services console to have a try?

    Clicking on the left hand side and then selecting the "Connect to another computer" option in the Action menu.

    Regards.

    If you have any feedback on our support, please click here


    Vivian Wang

    Monday, May 19, 2014 2:56 AM
    Moderator
  • Hi there,

    The server name is correct. I got it to work correctly by using the following syntax:

    psexec -accepteula \\THESERVER -e -u testuser -p thepassword7 sc.exe \\THESERVER STOP ServiceName


    Thursday, May 22, 2014 10:13 AM
  • you actually don't need to do both psexec and sc

    sc already supports doing remote service commands, it's the net command that doesn't support remote access

    Thursday, May 22, 2014 8:48 PM
  • Hi,

    Any update about the issue?

    Regards.


    Vivian Wang

    Monday, May 26, 2014 8:09 AM
    Moderator
  • was the service running? 

    ERROR_SERVICE_DOES_NOT_EXIST
    1060 (0x424)

    The specified service does not exist as an installed service.

    maybe you should query first whether the service is running or not, if the service runs then stop it.


    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

    Monday, May 26, 2014 8:29 AM