How to know exe is running and close the exe ?

I use launchExecutableEx() to run a exe,but before running ,I want to know if this exe is running,if running I will terminal it at first, which labwindows function can do it? I know TerminateExecutable() function,but it need a handle, i do not know the handle because the exe is running before run my program.

Not sure if all this is can really be helpful (I didn't tested it), but usinf some SDK functions you could:
List all running processes using EnumProcesses. Inside the SDK that comes with CVI you can search an example called "Enumerating all processes": this is the skeleton of this part of the job
Scan the list to obtain the process ID of your target executable, if running. You will need to know the exact name how the process appears in the list of active processes in the system: this can be difficult if the application is run under svchost or any other host process
Use OpenProcess and TerminateProcess to kill it: this is actually equivalent to terminating an application inside the task manager; it's a very rude method and the SDK lists all reasons why it should be used very rarely. In any case, if you feel this is safe for your environment it could be tempted
As I told you, this is only a framework for you to elaborate on: I never attempted all that. I just wanted to explain how I'd approach this job if I have to.
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 to Print a PDF file and Close the ACrobat Reader opened using WEBUTIL

    Hi All,
    I have used WEBUTIL successfully and printed files using webutil_host.nonblocking builtin. What happens is that after printing the file the Acrobat reader stays on the desktop of the client PC. How to close that file opened programmatically. I am unable to close it using any any commands or using following builtins from WEBUTIL.
      WEBUTIL_HOST.RELEASE_PROCESS(PROCESS_ID)
      WEBUTIL_HOST.TERMINATE_PROCESS(PROCESS_ID);My command to directly call the Acrobat reader file and print it is by using this command.
      M_STR_COMMAND    := 'cmd.exe /c start AcroRd32.exe /t '||CHR(34)||FILE_STR_PATH||'\'||FILE_NAME||CHR(34)||' '||CHR(34)||PRINTER_NAME||CHR(34);Help in this regard is much appreciated.
    Thanks in advance

    I think if you use the start-command, the execution is asynchronously and you won't get the correct process-id. Try to execute Acorbat directly without the cmd /c start in front of it.

  • Updating ipod touch to os5.1  got an error message "cannot connect the ipod touch because the pairing record is missing"   don't know what this means or how to fix but am stuck, only option is to answer ok and close the error box.  Any ideas?

    Updating ipod touch to os5.1  got an error message "cannot connect the ipod touch because the pairing record is missing"   don't know what this means or how to fix but am stuck, only option is to answer ok and close the error box.  Any ideas?

    #1
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - If a 5G iPod               
    Iphone 5 lightning port charging problem - SOLUTION!
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar
    #1.1 n/a because the errror message overrides it
    #2 see #1
    #3 iOS: Device not recognized in iTunes for Mac OS X
    But could be caused by #1
    #4 Covered by previous ones
    #5 Obvious jpegs are photos and thus will not sync as videos. Also see:
    iTunes: May be unable to transfer videos to iPhone, iPad, or iPod
    iTunes: Frequently asked questions about viewing and syncing videos
    #6 iOS: If you can't back up or restore from a backup in iTunes
    First #7 See #6
    Second #7 You have so many other problems resolve those first
    #8 Resolve other problems first

  • How to open an URL and close the URL window, using adobe javascript

    Hi,
      Is it possible to open an URL and close the URL back again(without allowing the user to perform any other operation)? I was able to acheive the opening of the URL, using the app.launchURL("address". true); - But here it lauches in new window, and how do i close the window using the javascript. Is it possible?
    Thanks.

    Hi all
    In addition to what Bobby W - Adobe TS added, you might find
    the following useful as a bypass or workaround to the pesky prompt.
    var pw=window.parent;pw.opener=window.self;window.open("
    http://www.adobe.com");
    pw.close();
    I think this will only work for IE browsers. Actually, I
    think the whole window.close() only works for IE, but could be
    wrong about that.
    Cheers... Rick

  • I in have a product registered an old account, how do i move it to a new account and close the old one?

    I in have a product registered an old account, how do i move it to a new account and close the old one?

    COntact support by web chat.
    Mylenium

  • I downloads the latest iTunes software update and it properly installed.  But,  I cannot close the window showing it was completed and the blue completion bar is full but cannot cancel or close it either.  Any ideas on how to clear that out and close the

    I downloaded the latest iTunes software update and it properly installed.  But,  I cannot close the update window showing it was completed and the blue completion bar is full but cannot cancel or close it either.  Any ideas on how to clear that out and close the window.  Tried to quit on both the big window and the software update title in the menu bar.  No luck.

    Tried that by shutting down via the power button only as the normal shutdown was nixed by the open window issue.  It did not help.  Found a very similar question in the discussions and it recommended "Force Quit".  That worked and the update works normal and the window is gone.  Thanks!

  • HT3696 How to know if your mac is using the latest Haswell architecture processor or not? and how to know the difference between the new imac and the 2012/13 imac?

    How to know if your mac is using the latest Haswell architecture processor or not? and how to know the difference between the new imac and the 2012/13 imac?

    Sorry to reopen an old post, but I've just purchased a 2nd hand late-2013 iMac (or so thats what the seller said).
    I'm always sceptical though, and just wanted to know if there is a way to check if my iMac is indeed the late-2013 model that included Haswell?
    I've attached screenshots of the About This Mac section hoping it may help shed some light.
    Thank you in advance for your help!
    PS - I can't compare to the iMac specs link you posted above because its now showing the late-2014 models.
    <Image Edited by Host to Remove Serial Number>

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • Everytime I click on iTunes Store it stops working and closes the whole itunes program

    I have restarted the computer several times, repaired several apple related programs from the control panel, but the problem persists. It is only when I am using the itunes software on my computer too. The regular library works fine and i can even play itunes radio, it only happens when I click the little "Itunes store" rectangle. It loading bar will show it had loaded about 3/4 of the store then it just stops and closes The whole program

    I am having the very same problem with iTunes, I'm running Windows 7 64 bit and started having the problem after the latest update. I just upgraded to the new 5s and was syncing everything to it, so I figured that I would update my itunes software as well. Which I never do after updating one time and had trouble with it on my old laptop and had to rollback to a older version of itunes. I have tried every suggestion that has been posted in the Apple Discussion area and on other websites no luck what so ever. I figured I will wait till Apple comes out with another update and try again. In the post above I am having the exact problem with iTunes.  I'd love to know what thef-ing problem is because this is extremely annoying!

  • Regarding to Outlook facing the problem. error show check online for a solution and close the problem

    Dear Team,
    Please solve this problem.
    Open the outlook then show below error.
    1. Check online for a solution and close the problem
    2. Close the program
    Please do the needful as well as possible.
    Thanks & Regards.
    Devesh Yadav
    9999815203

    Hello,
    So Outlook has failed to launch and an error dialog (error reporting) pops up. A lot of things can cause this issues.
    One of the main causes is a corrupt Navigation Pane settings file. You might need to start Outlook using the /resetnavpane
    switch. Just run command (Windows key + R), type or paste:
    outlook.exe /resetnavpane  (Please note that you will lose any customizations on the navigation pane)
    In certain cases, a corrupted data file will also cause this problem. So, if the /resetnavpane switch doesn't really work, please try to repair your data file with
    scanpst.exe tool:
    http://office.microsoft.com/en-us/outlook-help/repair-outlook-data-files-pst-and-ost-HA102749454.aspx
    If these cannot fix your issue, please be more specific on the error. Please click the button at the bottom of the error pop ups and copy the
    Problem signature here.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • Xp pc will not let me open the itunes store it faults and closes   the store or tutorials

    Dell XP will not let me reach the store or act on any tutorials.  It faults and closes the shortcut to Itunes.  I have the most current Qtime and just downloaded the store program..  According to the apple test for the store everything is up and running but it will not connect.
    Microsoft Windows XP Home Edition Service Pack 3 (Build 2600)
    Dell Computer Corporation Dimension 8300
    iTunes 10.7.0.21
    QuickTime 7.6
    FairPlay 2.2.19
    Apple Application Support 2.2.2
    iPod Updater Library 10.0d2
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 6.0.0.59
    Apple Mobile Device Driver not found.
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0012A81406E14F10
    Current user is an administrator.
    The current local date and time is 2012-09-22 10:32:41.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    NVIDIA GeForce 6200 
    **** External Plug-ins Information ****
    No external plug-ins installed.
    iPodService 10.7.0.21 is currently running.
    iTunesHelper 10.7.0.21 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name:        {D8D4748F-C04C-4432-8FCC-D1A6BE80F0B3}
    Description:             Intel(R) PRO/100 VE Network Connection - Packet Scheduler Miniport
    IP Address:              192.168.1.2
    Subnet Mask:          255.255.255.0
    Default Gateway:     192.168.1.1
    DHCP Enabled:       Yes
    DHCP Server:          192.168.1.1
    Lease Obtained:      Sat Sep 22 09:54:35 2012
    Lease Expires:         Sun Sep 23 09:54:35 2012
    DNS Servers:          192.168.1.1
    Active Connection:  LAN Connection
    Connected:              Yes
    Online:                     Yes
    Using Modem:         No
    Using LAN:              Yes
    Using Proxy:            No
    Firewall Information
    Windows Firewall is off.
    Connection attempt to Apple web site was successful.
    Connection attempt to browsing iTunes Store was successful.
    Connection attempt to purchasing from iTunes Store was successful.
    Connection attempt to iPhone activation server was successful.
    Connection attempt to firmware update server was successful.
    Connection attempt to Gracenote server was successful.
    iTunes has never successfully accessed the iTunes Store.

    Add me to the list. I just bought mine & can't log onto the Apple Store to rent/purchase. I can on my MBP.
    I've had the same thing happen when I tried to enter my YouTube username & password. It wouldn't accept it. I thought it was a fluke w/YouTube. Apparently not so.
    So, I can't buy or rent movies/TV shows. Exactly why do I want this gadget?
    How about an update on the Apple site that just recognizes these problems & promise a fix?
    Message was edited by: Randy Green

  • TestStand hangs and closes the sequence editor whenever I try to access Help.

    I'm having trouble whenever I try to access TestStand Help... in the help menu, the "contents" and "search" tabs work fine, but the "index" tab is the one that is giving an error... when clicked, it gives the following error and closes the application.
    "AppName: seqedit.exe AppVer: 3.5.0.725 ModName: itircl.dll
    ModVer: 5.2.3790.80 Offset: 0000800a"
    Can anyone identify the cause for the problem?

    Hi Sud:
    The problem you are seeing seems more of a windows error and not a TestStand one. Please see the following instructions that might help you:
    To resolve this problem follow the commands listed below to register the file itircl.dll:
    • Open up a DOS Window by going to Start --> Run.
    • Type cmd in the text window.
    • Type: cd c:\winnt\system32
    • Register itircl.dll by typing: regsvr32 itircl.dll
    Thank you
    Nandini
    NI

  • Host says off but guest is running and on the network

    2014 vray ... 

    I have the most perplexing issue. As the title states the host says the guest state is off but the guest is running and on the network. I am thinking it is happening during backup exec snapshots. It looks like the NIC dies out for a few min then starts back up. My guest is a 2008r2 standard running SQL 2008r2. My host is a 2008r2 datacenter running hyperv 6.1.7601. I have symantec vray edition and have had NOTHING but trouble ever since I "upgraded" to this version. I know my guest is going off the network as sql connections fail. I am not sure how to proceed. Suggestions?
    This topic first appeared in the Spiceworks Community

  • Windoes reports a NIMax error and closes the application when i try to open MAX

    Windoes reports a NIMax error and closes the application when i try to open MAX. It was fine just a couple of months before and i do not know why. I need to access the VIlogger for using my USB-6009 module.

    I wouldn't think this was a firewall problem - they tend to be better behaved than this. Before installing the new drivers, uninstall all the driver software, restart your computer and then attempt the install. If this doesn't work, uninstall all NI software - including LV - run a register cleaner like CCleaner, restart and reinstall everything. It THIS doesn't work, it's time to be talking to NI directly.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Can we open and close the cursor again and again

    hi all,
    with the help of cursor select statement i am writing some columns into the text file. while writing into the file in between i want to write something which belongs to others cursor. shall i close the first cursor and reopen it again..
    is its works?

    If you are using for loop the you don't need to open and close the cursor like:
    SQL> set autot off
    SQL> begin
      2     for i in (select ename, deptno, sal from emp)
      3     loop
      4             for j in (select dname from dept where deptno = i.deptno)
      5             loop
      6             dbms_output.put_line ('Ename:' || i.Ename ||'  Dept Name:'|| j.dname);
      7             end loop;
      8     end loop;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    Ename:SCOTT  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:ACCOUNTING
    PL/SQL procedure successfully completed.
    SQL> Or let us know about your requirements i.e. why you need to open/close the cursor again and again.

Maybe you are looking for