How to find out if an external program is running

I am using LabVIEW 8.6 and have some vis that start an external program using the System Exec call. The program that is being started was not written by me, and I have no control over it. I need to make sure that it is started before I proceed, but I don't want it started more than once. At the moment I need to terminate it manually when I exit the vi. I also need to make sure that it is not running when I start the vi or I will get two copies. I have a switch to prevent  this, but it requires manual inspection and control every time I start the vi. I would like to know if there is some way the vi can list all the programs running and start the external program only when necessary. Closing it at the end would also be nice, but not as important as starting it once and only once. If I had control over the program I could use the existence of a file to tell me if the program is running or not, but that isn't possible. Is there some tricky way to use stdout in the System Exec call to accomplish the same thing?
Rich

Nothing tricky about it. Just use the command appopriate for your OS. For Windows:
Then just use the Match Pattern function (for example) to search the string. 
Message Edited by smercurio_fc on 03-02-2009 01:52 PM
Attachments:
Example_VI_BD.png ‏1 KB

Similar Messages

  • How to find out whether an exe program is running?

    HI,
    I'd like to run an executable program from TestStand.   Before I do that I would like to check whether this program is already running?
    Can it be done?
    Thanks

    Hey Rafi,
    It can be done.  You have a couple options.  All of the processes are handled by the Operating System so you can possibly try:
    1-  Call a code module that will call into the Windows API and get all the process and see if that particular one is executing.
    2- Using ActiveX steps call into the Windows API to get all the process and see if that particular executable is running.
    You may have to read more about the Windows API to do this but I also think there are some SDK functions available to you as well.  Here is a link to an MSDN example: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/enumerating_all_proces...
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to find out back end mapping program for Idoc ?

    HI Experts,
    Iam new to ALE IIDOCS .. i have a issue in existing idoc .
    Some data maping problem is there in the existing idocs
    I need to find out back end program for this perticular idoc  no .
    Exactly where they have written the maping code  .
    How to find out this ?
    is there any preceedure to trace the back end program based on the idoc number .
    Regards
    RameshG

    Hi Ramesh,
    If you are looking at Inbound que then we generally double click on idoc go to control datat info and then take partner data info there
    Goto we20 check teh system and there double click the message type and there in inbound option double clik the porcess code it gives you one FM where you can see logic written to process that IDOC
    Regards,
    Poornima

  • How to find out tcode from a program that can run the same report?

    Hello all,
    I have a program name and I can see it is successfully proccessed. Now if I want to get the report via a tcode, how can I get it?
    How can I find the tcode from the program itself?
    Regards,

    Hi,
    1) Go into SE80, > Enter the name of the program, and press 'Enter'.
    2) You will see a folder called 'Transactions' appearing in the object list on the bottom left.
    3) Open the folder, and you'll find T.code of that program.
    Thanks,
    Nirav

  • How to find out what version of pages is running. I don't see get info link?

    how do i find out what version of pages is operating. i have updated but see no get info link?

    When Pages is running, select Pages > About Pages.  The latest version that only runs on OS X Mavericks is 5.0.1.

  • How to find out which application the code is running in?

    Hi,
    I am trying to develop a common code which will be part of various different applications.
    But I need to be able to figure out within the Java application which process is calling me.
    For example: one of the applications may be invoked as:
    java /opt/app1_dir/app1 ... (various command line options)
    I need the ability to access the String "/opt/app1_dir/app1" in the above call. I think String array from main method args[0,...] will give me the ability to access the command line parameters but not the actual command string.
    Due to legacy reasons, it is not possible to change the calling string.
    Can anyone please help me to figure out how I can access the above in my java application.
    Thanks,
    Amol

    amol_dev wrote:
    Thank you for your reply Brynjar.
    However, I was trying to figure out a way to do this without having to change the calling command line, because due to legacy reasons, it is not possible to change the command line calling the parent applications of this common code.You cannot change the command line, but you can change the applications?
    In main() do this:
    System.setProperty("whoami",(new Throwable().getStackTrace()[0].getClassName()));Elsewhere:
    String whoami = System.getProperty("whoami");

  • How to find out Which SAP programs are affecting Which Z programs?

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

  • Regarding how to find out a program is User Exit/executable

    Hi,
    Can anybody tell me how can we find wether a particular program is used in executable program (or) user exit program?
    One thing we can find out is wether the program type is 'I' or 'R' etc..
    Thanks in advance.
    Thanks,
    Deep.

    Hi...
    See the following links..
    it helps you a lot..
    how can we C the USER_EXITS in Z programs
    how can we find the list of user exits for a transaction
    How to find the active user exits in my client
    How to find user exits for a transaction
    Hope it helps you...
    Let me know if u have any more doubt...
    Reward points if useful......
    Suresh.......

  • How to find out the Trigeering program of an IDOC

    How to find out the Trigeering program of an IDOC ?
    Thank U

    sse the FUnction module ..MASTER_IDOC_DISTRIBUTE..if it is used zreport or program
    that means the message type used in the program are manually triggered.
    Prabhudas

  • How to find out the source program file in Proposal in Sales Online in CRM

    How to find out the source program file in Proposal in Sales Online in CRM

    You can find it in the oracle->apps->prp directory.
    It is the $JAVA_HOME

  • How to find out the script name used in driver program

    Hi Folks ,
                 I want to find out the Scripts(print program) used in my driver pogram .
    How is it possible any Tcode availble for this ?
    Thanks ,
    Jaga.D

    Hi Jagadish,
    Go to transaction SE38 and open the program RSNAST00. There search for the subroutine TNAPR_LESEN.
    Set a break point at that subroutine and leave. When printing the data from a transaction to a script or form (Like VA01 or VL02N), debugger is started when the processing reaches the subroutine in RSNAST00. There double click on the field TNAPR-FONAM. continue step-by-step execution. The field will display the name of the script or form that is currently being used.
    Another way to do this is to go to transaction NACE and check the transaction for which you want to find out the script. There you will find the script and print program that have been set for a particular transaction.

  • How to find out the last date & time on which a program has been run

    Hi Experts,
    Can anybody tell how to find out the last date on which a purticular program has been run.
    Valuable answers will be rewarded.
    Thanks & Regards,
    Satish.

    Hi!
    Try STAD transaction. Unfortunately it contains a huge amount of data, so it is available only for a few days backwards... Maybe some weeks, but you can't make yearly reports from its data... So it's not useful to see, which program is in use or not...
    I planned once to download it weekly, but it was not so important...
    Regards
    Tamá

  • How to find out internet explorer version ,using a java program?

    How to find out internet explorer version ,using a java program?

    Browser version from java?....you must be referring it from some web application....rite?
    You can read the User-Agent header using request.getUserAgent() or request.getHeader("User-Agent") in your jsp or servlet.
    for more details pls refer:
    http://www.jguru.com/jguru/faq/view.jsp?EID=12253

  • How to find out report program for a particular smartform?

    Hi,
    How to find out report program from which the smart form function module is calling?
    Thanks.

    Hi
    There's no tools to do that, u can only find out the program where a string with the name of your smartform is: probably it'll be your program.
    U can try to use the program RPR_ABAP_SOURCE_SCAN in order to looking for a string a abap program.
    But if the name of smartform is transfer to program dinamycally, u've few chances.
    Max

  • How to find out program name to the corresponding output type of invoice..

    hi ALL,
    I want to findout program name to my output type.
    For one invoice functional peoples are configured. Here i know the outtype. But i don't know the program name .
    Can any body please tell me how to find out the program name for the output type..?

    Hi,
    Goto NACE t-code
    Select Billing (V3)
    Press 'Output Types' Button
    In the next screen select the corresponding output type you want.
    Then press 'Processing Routines' in the left pane. You can see the program name
    Cheers,
    Kothand

Maybe you are looking for

  • S_ALR_87012168 - Due Date Analysis for Open Items - Add Characteristics?

    Hello, I am trying to add a characteristic to the output of this report. I am trying to add the Reference field from BKPF to the list of available characteristics to choose from. It is available in the dynamic selections list so the field should be a

  • Unsolvable Screen Sharing Authentication Error

    Here's my scenario... I have three Core2Duo iMacs (Let's call them "A" "B" and "C") on a local appletalk network all communicating fine in all directions via an Airport Extreme base station. When it comes to logging into each machine via file sharing

  • Regarding ALV format

    Dear All: i want to generate a withholding tax report with following format. i populated two internal tables for vendor information and withholding tax information. but cannot bring the format like this: Vendor      10000012     Vendor Name     ABC T

  • Transfering the line items

    HI.            I heard that, in sap we can transfer transaction line items from one g/l to anotehr g/l, but I don't know how to do,.. Could any one of you help to do that.....

  • KM Document Expiry Notification

    Hi,   We have a requirement to generate notifications upon the expiry of a document in KM. I am aware that the Lifetime service is available for controlling when a document becomes accessible to users with read-only access. Taking this a step further