Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Get result from "windows command"?

Questions and comments specific to a particular plugin should go here.
Post Reply
PaulBags
Posts: 14
Joined: Fri Oct 21, 2016 2:49 am

Get result from "windows command"?

Post 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'.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Get result from "windows command"?

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Get result from "windows command"?

Post by kgschlosser »

run the command in command line window and read the screen....

:-D
that's what it will return
If you like the work I have been doing then feel free to Image
PaulBags
Posts: 14
Joined: Fri Oct 21, 2016 2:49 am

Re: Get result from "windows command"?

Post 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.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Get result from "windows command"?

Post 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?
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Get result from "windows command"?

Post 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
If you like the work I have been doing then feel free to Image
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Get result from "windows command"?

Post by Pako »

For me everything is alright.
Pako
Attachments
nssm1.png
nssm2.png
nssm2.png (8.1 KiB) Viewed 2750 times
You know flattr ? You can Image
PaulBags
Posts: 14
Joined: Fri Oct 21, 2016 2:49 am

Re: Get result from "windows command"?

Post 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.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Get result from "windows command"?

Post by kgschlosser »

ok so you have the problem narrowed down to the version of nssm you are using. cool beans.
If you like the work I have been doing then feel free to Image
Post Reply