Hello,
I am trying to create a service for an application (exe). To start exe , I have to pass args as followed -
Testapp.exe -conf "app.xml"
Now, I want to create a service for this application , so that after machine restart , application will run by reading
configuration (app.xml).
I tried followed -
case 1) sc.exe create "Testapp" type= own start= auto binPath= "C:\myapp\Testapp.exe -conf C:\myapp\app.xml"
It didn't work.
case 2) sc.exe create "Testapp" type= own start= auto binPath= " \"C:\myapp\Testapp.exe\" -conf C:\myapp\app.xml"
service is created but service doesn't start. Giving error as it not up in timely manner.
So, i want to know how to create service with passing agruments as well.
There are various pages says , you can pass the arguments as optionname etc. But there is no proper example about how
to pass such arguments.