none
Not able to start the service the in powershell giving Error 1053: RRS feed

  • General discussion

  • HI ,

    I am able to create the service using new-service command and giving all the mandatory parameter with binary path of the exe which i want run .But once service is created then its not coming in running state when i am trying manually its giving.

    Error 1053: The service did not respond to the start or control request in a timely fashion.

    Please help .


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    • Changed type Bill_Stewart Thursday, September 5, 2019 9:42 PM
    • Moved by Bill_Stewart Thursday, September 5, 2019 9:42 PM Off-topic
    Friday, July 12, 2019 8:18 AM

All replies

  • Sorry but this is not a support forum. You will have to contact MS Support or find a consultant to help you fix your service.

    This forum is for scripting questions only.

    You cannot create a service from any EXE.  The exe must be designed as a service.  Contact the vendor for the EXE and let them help you.


    \_(ツ)_/

    Friday, July 12, 2019 8:51 AM
  • i am not using any exe to create the service i am using new-service command to create the service which is working fine but when i am trying to start the service its giving Error 1053 kind of error.I am not sure how should i achieve this.

    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Friday, July 12, 2019 9:21 AM
  • We cannot debug the EXE for you. Contact the vendor of the EXE to find out if it can be used as a service. This is not a scripting issue.

    Error with running services have nothing to do with scripting.


    \_(ツ)_/

    Friday, July 12, 2019 9:35 AM
  • New-Service command only creates a registry entry and a service database entry for the .exe file that you have mentioned in the command. The error above might be because of a number of reason, the New-Service cmdlet is doing it's job as the service entry got created, you can confirm the same using wind32_service class whether it's present or not.

    Check the exe file that you have created, you need to check a number of things, try below two links they might help:

    https://stackoverflow.com/questions/158371/error-1053-the-service-did-not-respond-to-the-start-or-control-request-in-a-tim

    https://www.how2fixerror.com/easiest-fix-windows-service-error-1053-the-service-respond/

    Friday, July 12, 2019 9:55 AM
  • i have tried all the option but still its giving the same message.

    at registry level also i have tried timeout option ,application 


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Friday, July 12, 2019 10:54 AM
  • Your question is about the service application you are using and is not a scripting question.


    -- Bill Stewart [Bill_Stewart]

    Friday, July 12, 2019 1:41 PM
  • i am using the code to create the service but when ever i am trying to start  the service it's giving the 1053 kind of alert .i am converting the ps1 file to exe using iexpress  module to convert the ps1 file to exe ..i have tried both option but not getting any idea why it's failing to start. searching from last three four days on the internet but i am really got frustrated . Please help or any idea or approach how i can achieve this.below is the sample code which i am using to create a service.
    New-Service -Name Top-Folder -binaryPathName "D:\testing\TopSizeFolder.ps1" -displayName "top folder" -startupType Automatic


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Sunday, July 14, 2019 12:21 PM
  • YOU CANNOT CREATE A SERVICE FROM A POWERSHELL SCRIPT!

    You need to have an executable for that.

    Please read the COMPLETE help for the cmdlet New-Service - especially for the parameter -BinaryPathName.


    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Sunday, July 14, 2019 4:00 PM
  • i am using the code to create the service but when ever i am trying to start  the service it's giving the 1053 kind of alert .i am converting the ps1 file to exe using iexpress  module to convert the ps1 file to exe ..i have tried both option but not getting any idea why it's failing to start. searching from last three four days on the internet but i am really got frustrated . Please help or any idea or approach how i can achieve this.below is the sample code which i am using to create a service.
    New-Service -Name Top-Folder -binaryPathName "D:\testing\TopSizeFolder.ps1" -displayName "top folder" -startupType Automatic


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    An EXE must support certain capabilities I  order to run as a service.  You EXE does not provide the correct response to allow it to run as a service.

    Here is one way to design a script that can be run as a service:

    https://msdn.microsoft.com/en-us/magazine/mt703436.aspx


    \_(ツ)_/

    Sunday, July 14, 2019 6:53 PM
  • this link is  very useful but require significant time to implement all the necessary switch for and exe to install as a service but not sure how much time it will take but i am sure i ll do it . it would be great if you can share  any sample example for reference .

    Thanks once again for giving the approach 


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Monday, July 15, 2019 5:32 PM
  • Your questions seem to reveal fundamental misunderstandings about what a service actually is.

    A service is a special kind of executable in Windows.

    Designing a script to run as a service is not really within the scope of this forum.

    Please read the following post from the top of this forum:

    This forum is for scripting questions rather than script requests


    -- Bill Stewart [Bill_Stewart]

    Monday, July 15, 2019 9:46 PM
  • well ! i didn't ask to write the code for me.i have just ask a sample or any kind of example which i can use for reference.

    Thanks for the support and clarification provided for the problem statement.


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    Tuesday, July 16, 2019 4:33 AM
  • well ! i didn't ask to write the code for me.i have just ask a sample or any kind of example which i can use for reference.

    Thanks for the support and clarification provided for the problem statement.


    Prashant Dev Pandey LIVE IN YOUR OWN WAY Please remember to mark the replies as answers if they help

    I posted a link above that has a complete example of how to create a service in PowerShell. Did you even look at it. The article also explains what service is and why you can't do what you have been trying to do.


    \_(ツ)_/

    Tuesday, July 16, 2019 4:43 AM
  • Please reread my response.

    Your question is a development question and is not within the scope of this forum.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, July 16, 2019 1:19 PM