Error 1053: Service does not start

Author Message
eawedat

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 7/30/2011
  • Status: offline
Error 1053: Service does not start Saturday, July 30, 2011 7:23 AM (permalink)
0
I have an exe that I compiled and wanted to run it as a service!

now I used the built-in command "sc" to create a service of my executable file! and it succeeded!

the thing is when I try to "start" the service I get this error!

Could not start the usb2 service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

thanks a lot.
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: online
    Re: Error 1053: Service does not start Sunday, July 31, 2011 4:53 PM (permalink)
    0
    Not a lot that we can do without seeing the code.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      eawedat

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 7/30/2011
      • Status: offline
      Re:Error 1053: Service does not start Sunday, July 31, 2011 9:05 PM (permalink)
      0
      Yes I understand that, the code below creates a service of any exe , code works fine and service would be created,, the only problem when I start the service! I get error message as mentioned above!

       Const OWN_PROCESS = 16 
       Const NOT_INTERACTIVE = False 
       Const NORMAL_ERROR_CONTROL = 2 
       
       strComputer = "." 
       Set objWMIService = GetObject("winmgmts:" & _ 
       "{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2") 
       
       Set objService = objWMIService.Get("Win32_BaseService") 
       errReturn = objService.Create("usb2", _ 
       "usb2", _ 
       "c:\usb2.exe", _ 
       OWN_PROCESS, _ 
       NORMAL_ERROR_CONTROL, _ 
       "Automatic", _ 
       NOT_INTERACTIVE, _ 
       "NT AUTHORITY\LocalService", "") 


      thanks.
       
      #3
        59cobalt

        • Total Posts : 969
        • Scores: 91
        • Reward points : 0
        • Joined: 7/17/2011
        • Status: offline
        Re:Error 1053: Service does not start Monday, August 01, 2011 12:23 AM (permalink)
        0
        Please do NOT run interactive services with elevated privileges. That kind of thing is a disaster waiting to happen. See MSKB article 327618.
         
        #4
          ebgreen

          • Total Posts : 8227
          • Scores: 98
          • Reward points : 0
          • Joined: 7/12/2005
          • Status: online
          Re:Error 1053: Service does not start Monday, August 01, 2011 2:05 AM (permalink)
          0
          Well from the error and from your description of the issue I suspect that the problem is in the code of the exe, not the vbscript. That is the code that I am talking about. As you say the vbscript appears to be making the service entry, but the exe code is not responding to the service start.
          "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
          Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
          http://www.visualbasicscript.com/m_47117/tm.htm
           
          #5
            eawedat

            • Total Posts : 3
            • Scores: 0
            • Reward points : 0
            • Joined: 7/30/2011
            • Status: offline
            Re:Error 1053: Service does not start Monday, August 01, 2011 2:14 AM (permalink)
            0
            this is the code of the executable file:
             
             'Version 1 works good:)
            strComputer = "." '(Any computer name or address)
            Set wmi = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
            Set wmiEvent = wmi.ExecNotificationQuery("select * from __InstanceOperationEvent within 1 where TargetInstance ISA 'Win32_PnPEntity' and TargetInstance.Description='USB Mass Storage Device'")
            While True
            Set usb = wmiEvent.NextEvent()
            Select Case usb.Path_.Class
            'USB is found
            Case "__InstanceCreationEvent" WScript.Echo("USB device found")
            'USB is removed
            Case "__InstanceDeletionEvent" WScript.Echo("USB device removed")
            
            ''Case "__InstanceModificationEvent" WScript.Echo("USB device modified")
            End Select
            Wend
            
            
             

             
            #6

              Online Bookmarks Sharing: Share/Bookmark

              Jump to:

              Current active users

              There are 0 members and 1 guests.

              Icon Legend and Permission

              • New Messages
              • No New Messages
              • Hot Topic w/ New Messages
              • Hot Topic w/o New Messages
              • Locked w/ New Messages
              • Locked w/o New Messages
              • Read Message
              • Post New Thread
              • Reply to message
              • Post New Poll
              • Submit Vote
              • Post reward post
              • Delete my own posts
              • Delete my own threads
              • Rate post

              2000-2012 ASPPlayground.NET Forum Version 3.9