M
mickey
Problem: An application I run utilizes a service (supplied with the
application) to connect to a special USB device. When the application
terminates it leaves the service running. When the application is run again
it fails to connect to it's hardware. I have found that if I manually
terminate the service, an then run the application, the application re-starts
the service and always connects to the hardware. I have advised the
manufacturer of the issue, but as a temporary work-around I would like to
launch the application using a .bat file, and when the application
terminates, the .bat file will stop the service.
I have created a .bat file that successfully launches the application,
however I can't seem to stop the service.
The command I'm using is NET STOP service, but no matter how I reference the
service I get an error. The name of the service is XNETS.exe
Here's what I've tried:
NET STOP XNETS.exe; error can find service
I went to "Services" and copied the exact path listed in the properties for
the service.
NET STOP C:\Progra~1\Common~1\XNET\XNETS.exe; error in filename, path, etc.
I can manually stop this service using the task manager; I see it listed in
"Services" and can either stop or start it there; but I can't get the NET
STOP command to find it.
I would appreciate some suggestions, thanks.
application) to connect to a special USB device. When the application
terminates it leaves the service running. When the application is run again
it fails to connect to it's hardware. I have found that if I manually
terminate the service, an then run the application, the application re-starts
the service and always connects to the hardware. I have advised the
manufacturer of the issue, but as a temporary work-around I would like to
launch the application using a .bat file, and when the application
terminates, the .bat file will stop the service.
I have created a .bat file that successfully launches the application,
however I can't seem to stop the service.
The command I'm using is NET STOP service, but no matter how I reference the
service I get an error. The name of the service is XNETS.exe
Here's what I've tried:
NET STOP XNETS.exe; error can find service
I went to "Services" and copied the exact path listed in the properties for
the service.
NET STOP C:\Progra~1\Common~1\XNET\XNETS.exe; error in filename, path, etc.
I can manually stop this service using the task manager; I see it listed in
"Services" and can either stop or start it there; but I can't get the NET
STOP command to find it.
I would appreciate some suggestions, thanks.