Page 1 of 1

Get result from "windows command"?

Posted: Fri Dec 09, 2016 12:22 pm
by PaulBags
I can't for the life of me figure out how to get what a "windows command" returns back into eventghost. I'm running 'nssm status <service_name>' and I expect something like 'SERVICE_RUNNING' as a result, but all I'm getting in eg.result is 'S'.

Re: Get result from "windows command"?

Posted: Fri Dec 09, 2016 4:43 pm
by kkl
Perhaps it has something to do with nssm. If I execute a standard windows command like 'dir' or 'ipconfig', I get the entire response in eg.result.

Re: Get result from "windows command"?

Posted: Fri Dec 09, 2016 5:23 pm
by kgschlosser
run the command in command line window and read the screen....

:-D
that's what it will return

Re: Get result from "windows command"?

Posted: Sat Dec 10, 2016 2:38 am
by PaulBags

Code: Select all

C:\WINDOWS\system32>nssm status deluged
SERVICE_RUNNING

C:\WINDOWS\system32>
But if I run

Code: Select all

nssm status deluged
from event ghost as a windows command and flash {eg.result} with showOCD I just get

Code: Select all

S
.


[edit] Same result if I run as administrator.

Re: Get result from "windows command"?

Posted: Sat Dec 10, 2016 4:48 am
by kkl
Perhaps it has something to do with your showOCD configuration. What is the actual value of eg.result? Right after your windows command, add the python command "print eg.result". What is shown in the log pane?

Re: Get result from "windows command"?

Posted: Sat Dec 10, 2016 5:00 am
by kgschlosser
make sure you have the "wait until application has terminated before proceeding" checked

if you don't it won't hang around and wait for the output

Re: Get result from "windows command"?

Posted: Sat Dec 10, 2016 6:54 am
by Pako
For me everything is alright.
Pako

Re: Get result from "windows command"?

Posted: Sat Dec 10, 2016 8:15 pm
by PaulBags
Ok the problem is nssm, specifically the release version "nssm 2.24 (2014-08-31)". Pre-release "nssm 2.24-87-g203bfae (2016-08-26)" works.

Crossing my fingers the pre-release is stable, and hey maybe there's other bug fixes.

Re: Get result from "windows command"?

Posted: Sun Dec 11, 2016 3:18 am
by kgschlosser
ok so you have the problem narrowed down to the version of nssm you are using. cool beans.