Mike_D
June 10, 2020, 5:21pm
1
Hello everyone,
I am trying to restart a Win Svc with an alert action and it fails with:
Cannot run program: cmd. Code error =2. No such file or directory
My alert action:
c:\Windows\System32\cmd.exe /c “sc start svc_name”
also tried cmd /c, cmd.exe /c etc…
Same command runs on server without any issues
I am on 5.2.11
Any ideas?
Thanks
what version of windows? maybe try:
net start svc_name
Mike_D
June 10, 2020, 6:26pm
3
Hi Darrell,
Win 2008 Std SP2.
Tried sc, net , same error. Code error =2. No such file or directory
Mike_D
June 10, 2020, 11:50pm
4
Exact same error on Win 2012 R2
Thats odd. Make sure to contact support. I cant duplicate it. Actually I cant get it to give me any error.
I am running simplehelp 5.2.11 What version are you on?
In your alert are you running a command or a toolbox?
Mike_D
June 11, 2020, 1:55pm
6
Hi Darrell,
I am on 5.2.11 as well, but running on a Linux box
Alert action : command.
If I run a tool box with the same command all is working
11/06 13:45:36.669: M594-10 13:45:36.669 (+ 0) [LoggingFramework] Executing command ‘[sc, start, fax]’
11/06 13:45:36.672: M594-10 13:45:36.672 (+ 3) [LoggingFramework] Target ‘LocatedAlertAbstractTarget’ failed to log event ‘LocatedAlertLogEvent’: Cannot run program “sc”: error=2, No such file or directory
11/06 13:45:36.672: M594-10 13:45:36.672 (+ 0) java.io.IOException: Cannot run program “sc”: error=2, No such file or directory
Mike_D:
‘[sc, start, fax]’
Odd that it put commas in between the command.
I am running the server on linux as well.
Definitely contact support with your logs.