We're using restmon to ingest logs from Solarwinds into DOI. The issue here is the resmon utility is currently being executing as a foreground process by simply running run.bat file in cmd, rather than a registered background service. We want your help for converting/running this in background as a service that we can set up monitoring for if something goes wrong.
Manually Creating a Service with sc.exe:
The sc.exe command-line utility allows for the manual creation and configuration of Windows services. This method offers more granular control but requires familiarity with command-line syntax.
Code
sc create "MyBatchService" binPath="C:\path\to\your\batchfile.bat" start="auto" DisplayName="My Custom Batch Service"
In this example:
"MyBatchService" is the name of the service.
binPath specifies the full path to your batch file.
start="auto" sets the service to start automatically with the system.
DisplayName provides a more descriptive name for the service in the Services management console.