locked
Trying RUN the bat file as services RRS feed

  • Question

  • Hi All

    Am trying to run an automation script in services below are the steps followed.
    Created the bat file as "java -jar C:\lavante\Automation\selenium-server-standalone-2.52.0.jar"saved the file in .bat format
    used CMD to create the service as"sc create myService binpath=C:\lavante\Automation\lavantesim"
    services created successfully but when am trying to run the service am getting an working message like
    Error 1053: "The service did not respond in a timely fashion
    in event log am able to fine two log 7000 & 7009
    for above issue created an Regedit"DWORD" in same service for ServicesPipeTimeout and value 180000.
    after above step also againg failed to run the service kindly help us on ASAP.

    Regards
    M Subrahmanya hebbar
    Wednesday, June 1, 2016 10:57 AM

Answers

  • Hi,

    What is your main purpose?
    Based on your description, are you trying to create a service running a .bat file?


    I have tested it on my side, it turns out same with you. I am afraid that we can't run a service this way.

    I found a similar case for your reference. It also indicates we cannot create a service running a .bat file. But there are still some workarounds that could be helpful, such as task scheduler.
    I hope it is helpful for you.
    http://serverfault.com/questions/54676/how-to-create-a-service-running-a-bat-file-on-windows-2008-server
    NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.

    Best regards


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com


    Thursday, June 2, 2016 9:21 AM