How can I tell if an executable is already running?

I'm writing a rather large LabWindows/CVI program, and occasionally will triple-click on the desktop icon, starting two copies of it. Is there some way to tell if a program is already running, so that the second copy can shut itself off?
Solved!
Go to Solution.

Look at CheckForDuplicateAppInstance () command: the help page shows also a short programming example.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How can we tell if a VI is already running before calling Start Asynchronous Call?

    The new Start Asynchronous Call node is awesome for spawning multiple instances of reentrant VIs.  However, I've stumbled a bit in using it for non-reentrant VIs.  The old practice of using the "Run VI" method would allow us to check the Execution.State of the VI before invoking the method to run it.  That way if the State was Running or Run Top Level, we could skip the invoke node and just use a property node to open its front panel.  WIth the Start Asynchronous Call node, it looks like we have to use a strictly typed static VI reference, and when we open the VI reference, the VI gets reserved and its Execution.State = Running.  So, how can I tell if it is not just reserved by the thread but actually executing before making a redundant Start call?
    By the way, the redundant Start has interesting behavior.  It will actually cause the targeted VI to be executed again after it stops.  Even if you hit the Abort button on the target VI, it will immediately execute again and again equal to the number of times the Start Asynchronous Call node was run.  There's nothing wrong with that, and I suppose the simple answer is to just go back to using the old "Run VI" method.  It's just that the ability to wire up those inputs directly to the connector pane is so nice.  Perhaps I am missing something obvious.  Oh, I am referring to the Call and Forget mode (0x80).
    Thanks,
    Dan
    Solved!
    Go to Solution.

    Just throwing it out there, I know I'm a year.5 late on this but if it's a psuedo-modal dialog or some other window that you only want a single instance visible at one time, you can check the FP.State property on the strictly typed vi reference. If it's loaded and visible to the user it will be "Standard", if it was closed or not opened prior then the state will be "Closed".
    I think the standard behavior of serializing execution on another thread would be great for doing a pre-set number of iterations with a sub vi in a non-blocking sort of way but for sub vi's meant for UI interaction checking FP.State works.
    Philip
    CLD

  • How can we tell if the iphone is already fully charged in ios7? Even if its 100% the thunderbolt icon is still displayed. Not like in ios 6 that we will know when to unplug the charger because there is an indicator.

    How can we tell if the iphone is already fully charged in ios7? Even if its 100% the thunderbolt icon is still displayed. Not like in ios 6 that we will know when to unplug the charger because there is an indicator.

    For those who seem unfamiliar with what is being asked:
    On iOS 6 and older, just because the phone reached 100%, didn't mean it was Fully Charged. The way you could tell was the lightning bolt symbol that indicated the device was charging would change to an outlet plug when the device was not only 100%, but also stopped accepting further charge. This symbol switch would occur anywhere from 5-15 minutes after the device already was displaying 100%.
    Now, on iOS 7, while it still reaches 100% with that same lightning bolt charge symbol, during the 100% point, it never switches to the plug symbol to indicate the charge period is totally finished.
    Can anyone confirm if there is a way to see this charge completion in iOS 7 since it appears that there is no longer a symbol for it? Is there any indication that Apple may have changed the charging display so that now it only displays 100% when it would have previously displayed that plug symbol?

  • How can i tell what itunes version i'm running?

    how can i tell what itunes version i'm running?

    Mac OS 10.0 – Cheetah
    Mac OS 10.1 – Puma
    Mac OS 10.2 – Jaguar
    Mac OS 10.3 – Panther
    Mac OS 10.4 – Tiger
    Mac OS 10.5 – Leopard
    Mac OS 10.6 - Snow Leopard
    Mac OS 10.7 – Lion
    Mac OS 10.8 - Mountain Lion
    Mac OS 10.9 - Mavericks (This release marks the beginning of a change in the naming scheme of OS X, departing from the use of big cats and moving to names based on places in California.Following the new naming scheme, the current version of the operating system is named Mavericks, after the surfing location in California.)

  • From a script (e.g. REXX or BAT) how can I tell if Firefox is up and running?

    System: Windows 7 Ultimate x64
    I'm trying to open Firefox with multiple tabs open at one time using a program, which reads a configuration file (XML). I discovered when using the "-new-tab" command line parameter, I get one windows for each URL instead of one window with multiple tabs.
    I can get it to work IF Firefox is already up and fully running. In other words its frames exist and are visible. If Firefox is only running (say in the tasklist) but not yet visible, the user again gets one window for each URL (e.g. 5 URLs = 5 Firefox windows) instead of 1 window with 5 tabs.
    Thus I've been wondering is there a method in Windows or using Firefox to tell from a script (e.g. REXX, BAT, Perl, etc) if Firefox is completely visible and running, so when you a script uses the "-new-tab" parameter the tab appears instead of a window (per URL).

    Hello and thank you for your reply,
    Now I wish I hadn't "cleaned" up my question to make it easier to read, but instead included examples. In my case, the initial firefox.exe command I used was:
    cmd /C start "FFXI Firefox" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-tab "http://wiki.ffxiclopedia.org/wiki/Main_Page" -new-tab "http://wiki.ffxiclopedia.org/wiki/Category:Combat_Skills" -new-tab "file:///C:/Users/Bertram Moshier/Programs/FFXI/FFXI_Skill_Caps.html" -new-tab "http://wiki.ffxiclopedia.org/wiki/Skill_Ups:_A_Guide_by_Kyrial" -new-tab "http://www.mithrapride.org/vana_time/" -new-tab "http://wiki.ffxiclopedia.org/wiki/Dragoon" "http://ffxi.somepage.com/mobdb/" -new-tab "http://www.ffxiah.com/item/4558/yagudo-drink" -new-tab "http://greatbigsea.guildlaunch.com/forums/index.php?gid=108403" -new-tab "http://guildwork.com/games/ffxi/shouts"
    As you can see in this version I put "-new-tab" in front of each URL and the result, since firefox version 9.0.1 has been:
    1) If firefox.exe is fully up and running a tab for each URL opens in one window.
    2) If firefox.exe is not fully up and running a window for each URL opens with only one tab.
    So, ah, I have been trying the -new-tab method from the start. Recently, I tried removing the -new-tab and it has been working, but I think that is more of a fluke than correctly working, as it goes against the documentation.
    As for tell if firefox is up and running, thanks! I've been using the following code, which is similar to yours. What I found, though, is simply having firefox.exe up and running in advance (or starting it) is NOT enough. Like your code, mine, tells if it is running in the Window's tasklist. Yet, my experience, thus far, has been until the firefox window appears, you still get the multiple windows for each "-new-tab" you send. Only if firefox.exe is already FULLY up and running with its windows visible does the "-new-tab" work per the documentation.
    Here is the core code I've been using (using REXX) -- this is static code on the URL and not the XML configuration version.
    NOTE: I think it is basically the same as your code, but longer . . . . My hope was the code would wait till firefox would be up enough for the "-new-tab" to work, which I find to be between 8 and 15 seconds depending upon the system. Again what I discovered is simply having the tasklist command show firefox.exe running is NOT enough. Well, this is true on my Windows 7 x64 system (Firefox 9.0.1 - 16)
    firefox_found = 0
    FFXI_Website_Queue = 'FFXI_Website'
    rc = rxqueue('delete',FFXI_Website_Queue)
    rc = rxqueue('create',FFXI_Website_Queue)
    rc = rxqueue('set',FFXI_Website_Queue)
    rc = !!Firefox_Exists()
    if rc = 0 then do
    'cmd /C start /D "C:\Program Files (x86)\Mozilla Firefox\" "FFXI Firefox" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"'
    rc = 0
    do until rc = 1
    rc = !!Firefox_Exists()
    call SysSleep(1)
    end
    end
    'cmd /C start "FFXI Firefox" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-tab "http://wiki.ffxiclopedia.org/wiki/Main_Page" -new-tab "http://wiki.ffxiclopedia.org/wiki/Category:Combat_Skills" -new-tab "file:///C:/Users/Bertram Moshier/Programs/FFXI/FFXI_Skill_Caps.html" -new-tab "http://wiki.ffxiclopedia.org/wiki/Skill_Ups:_A_Guide_by_Kyrial" -new-tab "http://www.mithrapride.org/vana_time/" -new-tab "http://wiki.ffxiclopedia.org/wiki/Dragoon" -new-tab "http://ffxi.somepage.com/mobdb/" -new-tab "http://www.ffxiah.com/item/4558/yagudo-drink" -new-tab "http://greatbigsea.guildlaunch.com/forums/index.php?gid=108403" -new-tab "http://guildwork.com/games/ffxi/shouts"'
    rc = rxqueue('delete',FFXI_Website_Queue)
    call !!EOJ 0
    /* >>>>>>>>>>>>>>>>>>>> Insert your subroutines here <<<<<<<<<<<<<<<<<<<< */
    | |
    | Subroutine section |
    | |
    !!Firefox_Exists:
    'tasklist /V /FI "IMAGENAME eq firefox.exe" | RxQueue' FFXI_Website_Queue '/FIFO'
    do while queued() <> 0
    parse pull Image_Name PID Session_Name Session_Number Memory_Usage Status User_Name CPU_Time Window_Title
    if Image_Name = 'firefox.exe' then do
    firefox_found = 1
    leave
    end
    end
    return firefox_found

  • How can I tell if a user has already authenticated against AD?

    Sorry to begin with if this has been dealt with in another thread already. Ive taken a look around and cant see something that answers my questions exactly. If such a thread exists, please point me in that direction.
    We have a product that needs to be installed on a customer site. Its a windows based, web fronted application with a client program on the user's pc and a server side component that handles requests for data. What I need to do is to check if the user has already authenticated against active directory. If so then I dont need to ask for authentication (single sign on).
    This is my first look at jndi so Im in the dark about how this should be done. Is there a way to use the user's credentials (is there a token?) to check or do I need a specific login for my application to access the customer AD?
    Any tips would be very welcome,
    Mark

    You may want to refer to the Java Security forum at http://forum.java.sun.com/forum.jspa?forumID=545 for information on Kerberos & JAAS.
    There is a also a post in this forum, outlining how to utilise Kerberos, JAAS with JNDI to access Active Directory. JNDI, Active Directory and Authentication (Part 1) (Kerberos)
    at http://forum.java.sun.com/thread.jspa?threadID=579829&tstart=300
    Possibly the part you are looking for is the functionality included in the class that implements java.security.PrivilegedAction
    Good luck.

  • How can I tell if my macbook pro is running osx 32 bit or 64 bit?

    help?

    And if you run the Activity Monitor found in Utilities, you can check the type of each of the processes in the Kind column.
    If the Kind column is not displayed, Control-click on the column headers to enable.

  • How can I tell if QT Streaming Server is running on my Mac?

    I installed this and was testing it a few years ago.  I was playing around with a DLNA server app and trying to connect from my Wii.  I got an error message on the Wii regarding qtss and I thought that maybe this is still running in the background.  I did a search and I couldn't find any apps that looked like they were a part of the original QTSS package.  Is there a simple way to see if this is actually running on my mac?
    Thanks,
    Chris

    You probably need to download a Pages update. Only the most recent Pages would support Versions.
    In the meantime, use TextEdit to figure out Versions as the TextEdit in Lion uses Versions.

  • How can I tell if my EMET GPO is in place instead of the local xml file on a computer?

    Hi,
    I did the following commands on my test machine with EMET 5.1 installed:
    emet_conf --delete_all
    emet_conf --refresh
    emet_conf --list
    There were applications that came up but how can I tell if it is really coming from GPO and not the local configuration file that came with EMET 5.1? Am I suppose to see a "greater than symbol" prior to the name of the application or no?
    When I ran rsop.msc on the machine, I can see that my group policy in place.  But I thought I'm suppose to see a greater than symbol (like below) - which means the list of apps are coming from the GPO:
    Executable             Path                                  
    Mitigations
    >7z.exe                *\7-Zip                               
    DEP SEHOP NullPage HeapSpray EAF MandatoryASLR BottomUpASLR
    >7zFM.exe              *\7-Zip                               
    DEP SEHOP NullPage HeapSpray EAF MandatoryASLR BottomUpASLR
    >7zG.exe               *\7-Zip                               
    DEP SEHOP NullPage HeapSpray EAF MandatoryASLR BottomUpASLR
    >Acrobat.exe           *\Adobe\Acrobat 8.0\Acrobat            DEP SEHOP NullPage HeapSpray EAF MandatoryASLR BottomUpASLR
    >Acrobat.exe           *\Adobe\Acrobat 9.0\Acrobat            DEP SEHOP NullPage HeapSpray EAF MandatoryASLR BottomUpASLR
    >Acrobat.exe           *\Adobe\Acrobat 10.0\Acrobat           DEP SEHOP NullPage HeapSpray
    Am I wrong? Is that an EMET 3.1 "thing" only?  Please let me know.
    Thanks!

    Never mind.  I got it.  If you do an "Emet_conf --List" it will turn out something like this that indicates you are getting your policies from GPO

  • How can I tell this FM to update the buffer before reading data??

    Hi All,
    I have developed a Web Dynpro Application that calls a FM.
    Values are written into the database (I use a standard FM for that).
    After that, values a read from the database to be show in the Web Dynpro Application again (Again, using a standard FM).
    However, the data is not being updated, that is, the data delivered by the function module is not the updated, new data, but the old data.
    If I select the data using simple select statements, ist is provided correctly (new data). That means the database already has the correct data, but the FM uses some sort of buffer which does not seem to be up to date at this point in time...
    How can I tell the FM to update is buffers before being acually executed?
    The function module in question is called HRIQ_ACAD_READ_TIMELIMITS, but I don't think this information is required to answer my question.
    THANKS, Johannes

    aye, thats ecaxtly what i meant.
    Displaying the data in a new process. i know this is not what you finally want, but if the data is correct in your new process we might get better ideas what is causing your buffer problems.
    BTW is your system scaled? do you have more than one application server and may this be a synchronisation error?

  • How can flex tell if  it's a mouseup event when the user releases the mouse button outside the flex application?

    how can flex tell if it's a mouseup event when the user
    releases the mouse button outside the flex application? Say for
    instance mousedown was done within a 500x500 embedded flex app but
    mouseup is outside or relased on the HTML background. One more
    thing, when we have something draggable, Flex doesn't execute the
    stopDrag() when the user releases the mouse button outside the
    embedded swf or fles app. Pls. help me with this. Thanks!

    I don't think the flex app can tell what happens outside the
    app. But it can detect when it leaves the app, so I have found the
    following line works fine inside initApp():
    this.stage.addEventListener(Event.MOUSE_LEAVE, yourFunction);
    and you have to:
    import flash.display.Stage;
    Doug

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more.

    My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more. Was working while watching a movie but when I pulled it out from the computer and put it back in the system would no longer mirrorr the screen on the TV.

    The best option is an appointment at an Apple store genius bar.  The evaluation will be for FREE!
    Ciao.

  • My ipad does not have the amount of GB on the back and in the settings it says 56gb! Also there is no setting called regulatory. It is an ipad 4 retina w wifi that i got as a Christmas present. Could it be a fake? How can i tell?

    My ipad does not have the amount of GB on the back and in the settings it says 56gb! Also there is no setting called regulatory. It is an ipad 4 retina w wifi that i got as a Christmas present. Could it be a fake? How can i tell?

    The amount of storage that is shown on the box and in Settings are calculated differently - the package uses 1 billion bytes as a gig (i.e. decimal), whereas in Settings it's shown as the binary definition : http://support.apple.com/kb/TS2419
    Also some space has been used for iOS, the built-in app and some space is lost due to formatting.

  • How can I tell what is "Auto Launching"

    User's (me) tech background:
    Fairly technical user here, but getting pretty rusty. In a past life (late '90s) I was a network administrator as well as server admins for NT 4, Novell (up to 4.11), AIX, and HP-UX servers. Used to be really good at a command prompt ($ or #) in AIX and HP-UX as well as MS DOS. I do have ROOT enabled on my Macs and I am not afraid to use it. However, I know how severe the consequences can be (trashed a customer's AIX server once using a -R switch in the root directory), so I am extremely cautious and must be confident of the instruction. Can probably fix most anything with some guidance........
    Here is the problem........ I have recently developed an error on boot, say within the last couple of weeks, where it tells me that some Vista application won't run because VM Ware will not initialize. The problem is VM Ware is not loaded on this computer (15" MBP model 8.2, i7 processor, 16MB of RAM, OS 10.7.4........ bought as a "refurb", never had a problem, have used this workstation for several months now). Boot Camp is not configured on this machine either. Nothing is in the Dock that would knowingly trigger this. When I go into System Information, I find nothing set as a "Startup Item" (screen shot attached) , making me think that I am looking in the wrong place. Where should I be looking?
    Interesting enough, when I go to System Information, and look under "Applications", I do see a lot of Vista items, including apps from an older MBP that I do not connect to (on same network, they have "rights" to connect, I just never do as there is nothing on there I need). I have attached a screen shot of this as well.
    Please, someone, can you give me some advice here?
    How can I tell where this auto loading of this Vista app is coming from
    How do I get rid of it
    Why did it happen "suddenly"?
    Can I go into System Info/Applications and delete any Vista or VM Ware apps?
    If I cannot do this via "System Info" can I remove (rm OR mv) the files from whichever system directory stores this data?
    This is puzzling and quite concerning. I would be deeply grateful if there is a "Yoda" out there that knows how to fix this.......
    Thanks in advance,
    Bill

        Managing your data usage is very important Bag02231958. I would like to thank ttipgem for the great suggestion to see what is using data on your phone. However, when you access the internet, social media apps, stream data, videos, music, etc. that uses data on your phone. Unfortunately, we do not have a list of what specifically is being accessed on the device to incur data. You do have the ability to view data records and time frames online via My Verizon http://bit.ly/xB4iTc
    Thank You,
    MichelleL_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • "Volume not found" I have 3 iphoto_libraries stored in a external disk, while the actual files are in other external disk. Ive moved together iphotolibraries and files but: HOW CAN I TELL THE LIBRARIES WHERE TO FIND THEM NOW?

    I have three iphoto_libraries stored in a external disk PASSPORT (one for each trip imovie Im making -Ive managed this way the libraries so to not confuse the trips) while the actual files are in OTHER external disk LACIE. And everything was fine: imovie find each library, could work with it, or iphoto could edit the files.
    But one day everything crashed at the same time: i opened iphoto to find 3 different scenarios:
    1) iphoto_library GREECE was there, but not the albums i prepared. no events. when double click in any of them: "Volume not found"
    2) iphoto_library ITALY was there, and the albums i prepared too, but empty.
    in both cases I can only see the photos in 'photos'  because 'events'  shows some events with photo preview and some with no preview, just some kind of preset clipart palm tree, but if i enter the event, photos are there but again: when double click in any item: "Volume not found"
    3)  iphoto_library ISRAEL was there, the albums too, when double click in any of them: all OK
    The 3 libraries was managed the same way. Meaning: Ive imported photos to iphoto from external disk LACIE in a iphotolibrary stored in another external disk PASSPORT. Also: I don't have unchecked the option "copy to file" or something like that. photos where moved, not copied. Also i have all the movie_libraries in the PASSPORT as well. What happened??
    Solution? Nothing yet. Ive moved now all the photo folders from LACIE together in PASSPORT with the iphotolibraries but problem persist:
    HOW CAN I TELL THE LIBRARIES WHERE TO LOOK FOR THE VOLUMES NOW?
    "Volumes" are the original files aren't them?
    Please help. this is so annoying to try and find in the forum, to tricky to explain
    I have a Macbook pro retina Yosemite 10.10.1 / iphoto 9.6 (910-29)/ iMovie 10.0.6
    THANK YOU
    Vicky

    The 3 libraries was managed the same way. Meaning: Ive imported photos to iphoto from external disk LACIE in a iphotolibrary stored in another external disk PASSPORT.
    This is not clear, especially when you say
    I don't have unchecked the option "copy to file" or something like that. photos where moved, not copied.
    Especially as the message you're getting is typical of a library where the ' option "copy to file" or something like that' is unchecked.
    So it's a simple question:
    Are you these Managed or Referenced Libraries?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management.

Maybe you are looking for

  • Archiving from 10.4.9 and reverting to 10.4.8?

    I'm having the 'dropping frames' issue discussed in this forum with FCE 2.0.3 and OS 10.4.9 I plan to revert to 10.4.8 Are there any articles about archiving what I've got in 10.4.9 so I don't lose any data during the transition? Many thanks for your

  • Output errors show up in Firefox but not IE. Is there a way I can disable this?

    Hello again! I've been having a bit of a problem where a dialog box comes up in Firefox that shows data that appears in my output when testing the movie in flash. The game works fine, despite the errors that Flash doesn't like in my actionscript. The

  • Problem in executing  tutWD_Popup_Init application

    I have imported the project template and when trying to deploy it is giving following errors . com.sap.tc.webdynpro.progmodel.api.IWDViewController can not be resolved . Any thing else to import ? Regards Bhat

  • Send email alerts to multi email addresses

    Hi Guys I have configured my alert on TCode: ALRTCATDEF, SCOT, SU01 and Iu2019me able to get the email alerts but the requirement is to send to other member on the team thought they donu2019t have User Ids in SAP PI. I need to know whether is possibl

  • Can't play certain album

    Hi there, I can't seem to play the below album (the artist's latest), although the rest of their catalog seems to be fine. Metric - Synthetica (2012): https://open.spotify.com/album/2xbkLrXys1oVlp5fgTgwSJ They just released a new single on Spotify, w