I am using srvany to run a batch file as a service. I am able create the service, but when I attempt to start the service I receive this error: The service on the Local Computer started and then stopped. Some services stop automatically if the have no work to do, for example, the Performance Logs and Alerts Service.
The batch file executes a robocopy command that copies files from one server to the other server using different parameters. The batch file will execute with zero mistakes when I run the file as a scheduled task or when ran manually, but it will not run when I run the file as service. In an attempt to resolve this issue I tried both running the service as local system account using a command in the batch that provided the user account to run the file under. I then attempted to run the file using domain admin account. Both attempts resulted in the same error.
In desperation I attempted another fix. This fix had me increase Application log file size. I did this and it did not help.
Any advice on this matter would help!
Thanks,
JJ
Start Free Trial