Open a *.exe applicatio​n in LABVIEW with system exec function.

Greetings,
I would like to be able to lauch a *.exe application and open a specific file within my labview vi. The trick is to avoid using active X control at all cost. I would like to use the system exec function but I couldn't quite get it to work.
Let's assume that I would like to lauch wordpad.exe from my local drive. What are the params I need to pass? Thanks.

You have to type in the command line of the System exec vi the name of the executable and eventually its path.
Look at the attached vi that launches Wordpad as you asked.
Attachments:
wordpad_exec.vi ‏72 KB

Similar Messages

  • Close a notepad window in labview after opening it with system exec

    Is there a way to close a notepad window within Labview after opening the window using the System Exec function?
    Also can Labview send characters to Notepad so they show up in its window?

    You can send a quit message to another window by using one of the VIs in a collection of windows interaction VIs called winutil32 (or something similar), but you will have to know the window name. Try searching for it on this site.
    You could probably also use the windows PostMessage function to send characters to another window, but that would require learning how to work with DLLs in LV, reading up on the function at the MSDN site and implementing it. Another, more simple but less secure, way is to use the windows Keybd_Event function to simulate keyboard clicks. If the notepad window has the focus, it will receive those clicks. Try searching this site or google for things like "Keybd_Event LabVIEW" or "simulate keyboard".
    Try to take over the world!

  • Run a program with system exec.vi

    hi
    I've got a problem with system exec.
    When I launch a simple program like :  c:\windows\notepad.exe it works very well.
    But when I launch a program with parameters, it doesn't.
    here is the command line:   c:\bmd.exe a.bmd a.txt ffffffff ffffffff  
    When I put this command line in a cmd windows it works perfectly. It don't understand...
    Any idea?
    Attachments:
    Sans titre1.JPG ‏22 KB

    Hi Julesjay,
    I found out that if the command string didn't include the path of the executable (start) the program would fail (at least with matlab executables) So make sure the path of the exe is included in the command string.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Execution of shortcuts with System Exec?

    Is it possible to execute a shortcut (typical named "Shortcut to nnnn") with System Exec.vi?

    No it isn't because shortcuts are not executable. Shortcuts are files which can be interpreted by the windows explorer.
    You can run a shortcut via the shell execute function. Attached is a VI which will call this function. In "Dateiname" you have to supply the filename with extension. In "Verzeichnis" you have to supply the folder where the file is. You can set the verb to "open" which will run the application and "print" which will cause the application to print the file if it can. "Rückgabe" is the return from the shell execute function.
    You can use each file extension to start the registered application for the file. If you give a file with the name Test.vi you will start LabVIEW in the same way you will start it like you have double clicked th
    e file in the explorer.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    ShellExecute.vi ‏114 KB

  • General Inquiry Regarding Error Handling with System Exec.vi

    I have a sub vi that uses the System Exec.vi to send SMS messages when triggered. I am confused as to how the error handling works and why all of the errors seem to go to the "standard error" vs the "Error out". The reason I am interested is because I am trying to interrupt the error out of another script to execute a command if error=true.
    I have intentionally created an error to test this, however it does not seem that the signal is ever being sent to the error out, only to the standard error.
    Any help/explanation as to how this works would be greatly appreciated.

    The Facebook discussion board is just a pilot and that functionality is not available yet (as to my knowledge). You will have to use the actual forum thread to add attachments. You can click the arrow just to the right of thread topic in the Facebook thread and that will take you to the ni.com/forums thread. Or you can navigate here:
    http://forums.ni.com/t5/LabVIEW/General-Inquiry-Regarding-Error-Handling-with-System-Exec-vi/m-p/246...
    Having a look at your VI would help to clarify the error handling issue.
    Daniel K | NI Applications Engineer | Certified LabVIEW Developer

  • How to Launch a "setup.exe" with LabVIEW app? No luck with System Exec.vi

    I've got an application that I'm trying to update with a separate LabVIEW application (the "Updater"). It's the "Check for Updates" capability you see on other major apps.
    Here's the glitch: When the Updater tries to launch "setup.exe" using "System Exec.vi", The installer seems to catch the attempt and pops a dialog titled "Windws XP Setup" saying "Please go to the Control Panel to install and configure system components".  The install does not begin and the installer closes (if it was ever open!).
    Running the same installer by double-clicking the "setup.exe" file from windows runs just fine.
    Here's the question: "How can a LabView app launch an installer?" 

    Could you show the code.
    Look at the path where you want to run the code.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to capture keyboard strokes while focus is on an external app. Opened with system exec

    Hi to the Forum,
    I have an application that runs an external app. Through system exec, while this application is open the user needs to input a 6 digit serial number using the keyboard, I need to capture in parallel that information on my main VI in order to perform some information validations, such as the six digits were entered, the serial number is not repeated etc. I have read other post about the same issue but did not found a practical way to achieve a solution, please help with an example of how to do that as I'm on the final stage of the project.
    Thanks in advance for your time and help.
    MRDK

    Hi MRDK,
    You can/have to use Connectivity>>Input Device Control palette functions.
    Attached is the simple example.
    Regards,
    Yogesh Redemptor
    Regards,
    Yogesh Redemptor
    Attachments:
    Get Keyboard Event.vi ‏15 KB

  • PsExec.exe Runing on labview2012 with System Exec.vi

    I have problem on this,it report erroe to run PsExec.exe using "System Exec.vi". It runs well on Labview8.6 version,but has problems on Labview2012. Could someone give some help?
    Solved!
    Go to Solution.

    Should this works?but it report the error
    Attachments:
    untitled.JPG ‏37 KB

  • Why I get an error when I call Snipping Tool with System Exec?

    Hi to everyone, I want to call Snipping Tool from LabVIEW using the System Exec VI, but I always get an error 2; this not happen when I call another executables like calculator or paint; I hope someone can help me or tell me why this error occurs.
    Thanks in advance, I have attached a couple of images of the VI that I have done so far.
    Solved!
    Go to Solution.
    Attachments:
    block diagram.PNG ‏11 KB

    Hey there ;
    I am guessing you are using the command: SnippingTool or SnippingTool.exe, just as you would use mspaint; but it is giving you Error 2; this is a Windows Issue more than a LabVIEW one, ,you can try using command:
    C:\Windows\Sysnative\snippingtool.exe;
    it worked for me; i found this info in the KB below.
    Command Not Recognized When Using System Exec VI
    Good luck

  • Problem: Using "msg" command with "System Exec.vi"

    I'm attempting to write some LabView code that takes advantage of the "System Exec.vi". At the moment, I've tried using it to ping machines, return the ipconfig and run through the example code that NI provides.
    I would like to use the "msg" command used on Windows operating systems to send out a message to multiple machines on our network at once. Warning them we're about to update a program and they should log-off, things like that.
    I tried using the "msg" command in LabView keeps returning errors. I also wrote a quick batch file as follows:
    @echo on
    cd c:\Windows\System32\
    msg.exe /server:localhost * test
    When I launch the batch from windows, it executes. When I launch it from LabView (using the System Exec.vi) it fails.
    Potential Quirks:
    I discovered in a different location that in order for a machine to receive these messages they need to have a registry entry in:
    "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" and have a DWord called "AllowRemoteRPC" = 1.
    Note that "/server:localhost" could be "/server:anycomputer" and the " * " is used as a wildcard which sends a message to anyone who is logged onto that machine. Also note that "test" is the message to be sent.
    Any ideas why I'm having a problem?
    tl;dr: "System Exec.vi" won't run the "msg" command. Why is this?
    - Mike
    ~~~~~~~~~~~~~~
    Current Setup:
    LabView 2010
    Windows 7
    Solved!
    Go to Solution.

    -> What versions of labview and windows are you on?
    LabView 2010 and Windows 7.
    -> Have you ever sent any commands out, or is msg the only one you've tried so far?
    I've successfully used the 'ping' command and also returned a standard 'help' command to LabView.
    -> Finally, in tools>>options, you may need to change your access settings under VIserver and Webserver.
    My VI server settings are allowing everything except "Show VI Scripting Functions, properties and methods"
    I have nothing configured for a web server, since I didn't plan on using it for this. Unless it has some sort of connection that I am missing.
    I'm attempting a work-around where LabView will generate a batch file to run from the desktop instead, since it seems that something is getting lost in translation between LabView and the command-prompt.
    - Mike
    ~~~~~~~~~~~~~~
    Current Setup:
    LabView 2010
    Windows 7

  • Using Labview's System Exec.vi, is there any way to send multiple standard inputs to the same executeable console? Or is there a way using Labview to target the window for the executeable and send commands to it at will?

    thanks

    One suggestion is to write a batch (.bat) file that will call your executable. The batch file can contain all the standard inputs necessary to run the executable. Then, in LabVIEW, you can call the .bat file using the System Exec.vi.
    As far as your second question, there is no slick way to do this LabVIEW. You would probably have to call Window API functions using the Call Library Function utility. There is a set of VI's that call some of the standard API functions but I don't think they have what you want.
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&74DDE683A1AFF6988625683A000C0D73&cat=034E59A8530E09DF862568900018707A
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Will the new Open Platform allow for a php like quote system to function within a bc site?

    I'm currently running a website that is built in wordpress, and uses a quote system built in php to fetch data based on the questions the person fills out from an online form.
    I'm interested in moving this site over to BC, I tried to in the past, but I discovered prior to Open Platform, this type of quote system would not be very possible, so we stuck with wp for its ability to leverage php integration.
    With the current site we upload an excel sheet as well as company logos that correspond to the there prices. The excel has all the prices layed out, its just a matter of the php fetching the info and provided quotes to the person.
    Below is a rough example A and B of what currently shows(roughed out images to respect the companies). My question to the gurus of BC, now with Open Platform, will we be able to effectively recreate this same set up, and if so, perhaps there is a developer that would be interested, in working with me on this, and if it could be achieved in the language that OP is using. I hope my query makes a little sense. Best - Erik
    Example A. Form.
    Example B. Quote Rates based on selections

    Hi createmint,
    It is possible to integrate 3rd party code (including php) if you can host the php on your own. Below is how I think you can achieve this:
    1. Host your php quotation system on an accessible web server.
    2. Register an application from BC partner portal.
    3. In your menu.json you point the default entry to your external site:
        "menu-meet_the_team": {
            "weight": 10000,
            "title": "Quotation system",
            "attr" : {
                "href" : "http://www.myquotationsystem.com/oauth/bc_cb.php"
    4. At this step you will have an entry in menu.json which will point to http://www.myquotationsystem.com/oauth/bc_cb.php php script (this is your start page of the application). At this point your quotation system is integrated in BC admin console. Moreover, the php callback receives an access token into hash fragment which can be used to call BC APIs.
    5. You would probably need to change your quotation system a little bit in order to create some frontend pages which display your app frontend to users.
    Of course, I totally agree with Liam that you should try to migrate your app to web apps but maybe the solution presented above will do the trick for short term.
    Regards,
    Radu

  • Trouble with Runtime exec() function

    Howdy-dodee peeps,
    I'm having trouble with executing external command. The command exits with value greater than 0 however if I execute the command line on "command prompt" it works fine.
    Can someone tell me, what I'm doing wrong?
    Thanx.
    PS: using imagemagick to rescale image and windows XP.
    public class Test {
         public static void main(String[] args) {
              try {
                   String commandLine = "convert -resize 176x208! 9781416506614.jpg test.jpg";
                   Process p = Runtime.getRuntime().exec(commandLine);
                   p.waitFor();
                   System.out.println("INFO: " + p.exitValue());
              }catch (Exception err) {
                   err.printStackTrace();
    }Edited by: getmizanur on Aug 23, 2009 3:56 PM

    Howdy-dodee peepsHowdy-dodee peep! /* whatever that might mean */ A side note: Image Magick's well-known and not without reason so popular convert program's name clashes on Windows with the built-in command letting convert say a FAT file system into an NTFS one.

  • Firefox 3.6 does not open onto my desktop from the dock when links in email or other files are opened. I have eMac with system 10.4.11 in English

    Firefox 3.6 does not open onto my desktop from the dock when links in email or other files are opened, use to. I have eMac with system 10.4.11 in English
    Thanks, Claude Combs
    [email protected]

    Firefox 3.6 does not open onto my desktop from the dock when links in email or other files are opened, use to. I have eMac with system 10.4.11 in English
    Thanks, Claude Combs
    [email protected]

  • System exec with telnet.exe

    I am trying to execute the windows program telnet.exe from the system exec function but I only get error 2 back. I am aware that it indicates that the path of the program is not correct. However when I do the same with notepad.exe which is in the same folder (c:\windows\system32\) it works fine.
    Any ideas?
    /martin
    Attachments:
    telnet.vi ‏14 KB

    Rollerboy wrote:
    Hi again Mark
    I was looking among the examples but I don't seem to  find what you are refering to. Could you please direct me!
    You could search for TCP using the example finder. They have basic examples of servers and clients. Do you have all of your palletes visble? You can view more by selecting additional palletes. View the Functions pallete (View->Functions Pallete) and select the Customize tab. From there make sure you are displaying the Data Communication pallete.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Maybe you are looking for

  • Standard report for leading prod. order with variance  value  & qty.

    Hi Gurus, I am searching for  a standard Tcode to get the variance value/Qty against all the leading production orders which are settled in a particular period. Note: If a leading production order contains more than one sub orders then the qunatity o

  • WLC 5508 AP-Manager interface

    Hi, I own a WLC 5508 and I (probably) do not understand AP-Manager interfaces. I have a lab with 2x 1242AG and 1x 1252AG connected to c2960. APs are in vlan 10 (192.168.10.0/24, configured via DHCP), APs are connected to "switchport mode access" inte

  • Pipe in real time

    Hi David, we want to know: is there any problem to not use pipes (PipedInputStream PipedOutputStream PipedReader PipedWriter) in real time environment. Gabi

  • Reflections: What am I doing wrong here?

    Given the object: public class TestObject      public Object[] oArray;      public int[] iArray; }and the code TestObject to = new TestObject(); Field objectArrayField = to.getClass().getField("oArray"); Object oArray = Array.newInstance(objectArrayF

  • How long should your iPad stay at a full charge

    How long should my ipad2 stay full charge?