NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting current parent (exe) application

Solved!
Go to solution
Is there a way to detect which user interface is currently running ?
I want to detect, in the process model, if the user is currently running the 'standard' SeqEdit.exe or a custom user interface.

Maybe is it possible with the Engine.Caller but I have at this moment no clue how to do this.

TIA.
0 Kudos
Message 1 of 3
(2,961 Views)

You can try to guess the name by using this solution:

 

I'm using a tool from the Sysinternals suite: PsTools -> PsList

 

Batchfile:

 

echo off

PsList SeqEdit

if errorlevel 1 goto error

echo ---------- SeqEdit found -----------

goto end

:error

echo ----------- not found --------------

:end

pause

 

 

Or the "PsList" can also be used as a "Call Executable" step. 

Message Edited by Martin Greil on 04-05-2010 04:04 AM
Message 2 of 3
(2,949 Views)
Solution
Accepted by topic author FOstyn

Thanks Martin for your suggestion.

It's not exactly what I was looking for, because I didn't want to create a new (extra) file (batch or dll,..) .

 

But it helped me to re-think my problem and of course...

In our process model, we create an instance of a (.NET) custom dll, so, .NET has a Process class and the GetCurrentProcess() method returns the name of the current (exe) application...

 

Thanks.

0 Kudos
Message 3 of 3
(2,935 Views)