"System Exec" Output to same window that called it

Hi,
I have a complicated program, but let me break it down to what matters.
My labVIEW application (exe) is called by the command prompt. Does some calculations based on arguments I passed to it.
The thing I can't quite seem to figure out, is how to export those results to the very same command prompt that called it. (Not a new window) I'm hoping to run my program in the background, and so I'm hoping to avoid anything fancy, and just want the results in the same window that called it.
Any help would be greatly appreciated.
Regards,
Nyne
Solved!
Go to Solution.

There really isn't an easy way to do this. On Windows you can have several options:
Try to use the Windows API Console commands (never really had that much luck with these).
Use the .NET console class (I doubt this will work).
Use a trick I had suggested in copying text from the console to just paste text directly into the console window. Attached is a VI that does this. Note that this is in 8.2 so I am unable to connect the error cluster due to a bug in 8.2.
Attachments:
Paste to Console.vi ‏18 KB

Similar Messages

  • How can I make my computer restart with all the same windows that were open when a shut it down?

    How can I make my computer restart with all the same windows that were open when a shut it down?

    That is the way Mac OS X 10.8 (aka Mountain Lion) works by default. Are you actually running that system? (See About This Mac in the Apple menu.) If so, make sure the check box in the shut down alert is checked:

  • System Exec output

    The example below ilustrates the problem I'm having.
    What I want to do is run an Executable, Wait until done.
    But the issue I have is when I run the wait until done with the flag to True the output is blank until it completes.
    When I runn it with the flag off I can see that my process is putting output to the console.
    Anyone knows how to Wait Until Done True and still see the progress of the process while it's still working?
    Thanks,
    Maciej
    Attachments:
    CommandLine.zip ‏13 KB

    Hi Smercurio,
    Thanks for that ... I did stumble upon that post and I appreciate you puttning down an example there on how to use the WinAPI.
    I've seen your example too which does seem to work to some extent but for example I've notided that you cant move or resize the command windonw now using your method ... and I simply got annoyed so I gave up.
    I think I'm just going to go for launching the the CMD silently and reading the console out either with WIN API or by reading an output file and I'll mimic the console in a LV textbox.
    I just wanted to knock up something up for a meeting I have in a few hours to present this ... and I didn't want to use a workaround which might have an issue it.
    Havent tried out the Open G yet ..but I'm low on time so I'll inspect all avenues when I get to implement the CMD line feature properly.
    I posted here in the hopes of getting an answer on how to get this to work without workarounds but it seems that it is just how the System Exec Feature is designed.
    Thank you,
    Maciej 

  • How to close a window that is called from main window?

    hi....
    I have a main window that calls a second window, but when I close the second window all my application end. I just want the second window returns to main window. how do I do it?

    Set the onClose behaviour: ... something like setDefaultCloseOperation
    dont exist, instead dispose.
    In addition you could attach a listener to the windowClosing event

  • Open a URL link in the same window as SWF file in indesign CS5

    Hello,
    I am trying to create a SWF file using indesign CS5.  I have created buttons and placed in URL links but they always open another window.  I would like to know if there is a way to have the URL open in the same window that the SWF file has been created.  I tried, putting "_self" to target it in the URL bar, but nothing works.
    Thanks in advance
    TK

    Okay, I found the code but I can't get it to work locally.  If you have a web server maybe you can upload the files (swf and html) after you Publish them:
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    var myURL:URLRequest = new URLRequest ("http://www.google.com");
    testlink.addEventListener(MouseEvent.CLICK, clickText);
    function clickText(myevent:MouseEvent):void {
    navigateToURL(myURL, "_self");
    you have to have on the stage a link element called "testlink" (see the code above) which would be a Movie Clip with the label testlink.  It can be anything from InDesign:  a button, a rectangle, a circle, a graphic, you get the idea.  Just select that object in Flash and label it testlink or anything you choose but if you change the name from testlink also change the name in the code snippet where the line "addEventListener" is.

  • Open UWL items by default in the same window

    Hi All,
    Appreciate if you could let me know if the following scenaio is possible?
    When the user logs into the portal he will be seeing the "Inbox' page which is nothing but a standard UWL iview.
    We have a task(TS001) for example which appears in the "Tasks" tab. Selecting an entry displays the following:
    - Details
    - Logged-On User Information  
    - Current View Information  
    - Current Navigation Information  
    - Current Item Information  
    All these are fine. Clicking on the "Subject" line, results a new window being opened fir the manager to either "Approve" or "Reject" the leave.
    What I would like to do is:
    I want the same window (that has opened in a new window) to be opened by default in the same window just beneath the "- Current Item Information". Meaning, selecting the row, should display the webdynpro iview in the same page rather than actually clicking on the "Subject" link.
    Hope it's not too confusing....
    Appreciate your reply and thanks in advance.
    Cheers,
    Sathya

    Hi Saytha,
    Is opening the workitems by clicking on the subject in the same window an option?  I can help with this.
    Within the xml files you can use the parameter called launch in new window.  You can set this to No so that when you click on the subject of a task, the content that opens, stays opened right in the main part of the portal.
    Here is some additional information about this:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/05b15de3864040a9426788a12699b3/content.htm
    Beth Maben
    EP - Senior Support Consultant
    AGS Primary Support, Business Suite & Technology
    Please see the UWL Wiki @
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • Open Form Based On A Table in same window

    Hi All,
    First to make things clearer I'll explain what I CAN do:
    Create a page which queries a session variable at the start and then
    depending on its value outputs different HTML, but always in the same
    format and more importantly the same window, to keep the look and feel etc...
    I have a link in a page which when clicked opens a form using wwa_app_module.link
    so it auto queries the form. This works fine.
    What I CAN NOT do is:
    The form was created using the "form based on a table wizard" and always opens
    in a new window.
    Can I make the form open in the same window that contains my wwa_app_module.link?
    Is this possible in a newer version that I have (I got Release 1)
    Any Suggestions?
    Cheers,
    Barry

    Firstly thanks Rahul Dubey for responding.
    What I mean by " contains my wwa_app_module.link? " :
    I have a form which contains a link similar to the one below:
    http://xxx.co.uk:8015/pls/pod130/PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1389245486&p_arg_names=EMPNO&
    p_arg_values=7654&p_arg_names=_empno_cond&p_arg_values=%3D%3E
    When I click on this link it opens the form and runs a query automatically.
    The problem is I want to click on the link and have the form appear in the
    same window, not a new one.
    Cheers,
    Barry

  • E3631A IVI class driver can not enable power supply three channel outputs at same time

    Hallo,
    with E3631A IVI class driver i am trying to enable all the channels at the same time,The problem is that class driver supports only Channel Switching between three Channel,i find in this Forums this Discussion 
    http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/E3631A-IVI-class-driver-cannot-enable-power-s...
    is it possible to enable all outputs at same time  that I modify the source code and recompile the drivers,but it is complicated for me.
     Is there a another easy way to solve this problem??
    Would appreciate if someone who has worked on it suggest a method appropriately. Thanks!
    Note:Labview 2009 sp1

    You'll either have to modify yourself, ask the poster in that other thread for it, or use the LabVIEW driver.

  • How can I run different commands in the same system exec window?

    I want to open a window (cygwin) on my Xp machine and sent commands within that window. I then have to monitor what the responses are coming back into the window that was launched. Any ideas on how to do this? I have been playing with the system exec VI but can't seem to get it to do what I want. Any help would be appreciated. Thanks - Troy

    Hello,
    Have you tried setting the wait until completion to true on the System Exec VI?  If so, the LabVIEW documentation claims that the parameter "standard output returns information from the program you called if wait until completion is TRUE. If wait until completion is FALSE, System Exec returns an empty string."
    Could this be the answer to the problem of getting the data returned?
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • 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

  • I would like to know which app/software in MAC gives us the same feature that is provided by System Restore in Windows, and how does that work

    I would like to know which app/software in MAC gives us the same feature that is provided by System Restore in Windows, and how does that work.

    Time Machine is one such program, although it is a recursive backup program which offers limited archive capability, based on the capacity of the backup destination, and it requires you set it up before you start editing your files.   Some programs are also Versions aware, which offers a kind of restore capability by file.  Again needs to be setup before you start editing.
    Just a for-your-info:
    Mac is not an acronym, it is a nickname for Macintosh.

  • How do I determine expected output size for System Exec vi

    I am running a DOS exe from a Batch file using the System Exec vi. My exe is programming software for a microcontroller and passes data to the programmer via the serial port. When I run the batch file externaly to LabView it works fine. When I run the same batch file using the System Exec vi I get an error from the programmer app (DOS app). Not every time but usually within 20 attempts. I reduced the execution priority of my vi's to give more time to the DOS window. This seems to have helped but hasn't solved the problem completely. I read in the help file that LabView will run more efficiently if you specifiy the expected output size in the System Exec vi, but how do I determine it? Is the expected output
    size the size of the bat file I call?

    > I am running a DOS exe from a Batch file using the System Exec vi. My
    > exe is programming software for a microcontroller and passes data to
    > the programmer via the serial port. When I run the batch file
    > externaly to LabView it works fine. When I run the same batch file
    > using the System Exec vi I get an error from the programmer app (DOS
    > app). Not every time but usually within 20 attempts. I reduced the
    > execution priority of my vi's to give more time to the DOS window.
    > This seems to have helped but hasn't solved the problem completely. I
    > read in the help file that LabView will run more efficiently if you
    > specifiy the expected output size in the System Exec vi, but how do I
    > determine it? Is the expected output size the size of the bat fi
    le I
    > call?
    If you think it is due to timing, and you wish to yield to the DOS app,
    don't just lower the priority of LV, but use Wait ms to put overeager
    diagram elements to sleep and limit their loop rate. Use the task
    manager or performance monitor of the computer to determint if this is
    the issue.
    Greg McKaskle

  • Running Oracle Reports via a client using system.exec call from war file

    Hi all,
    I am trying to deploy a war file application to a J2EE 10.1.3 application server. The deployment successfully completes. However testing the application fails.
    When testing, the application reveals that calling a Oracle Reports 6i client (using a cmd line exec) from the war file returns application errors. The errors we get from executing the call below (using debug statements), creates this error:
    OperatingSystemCmd: cmd = D:\Oracle\Dev6i\BIN\rwcli60 MODULE="CLTMLST" USERID="<userid>/<pwd>@<db>" DESTYPE="FILE" DESFORMAT="PDF" DESNAME="<path>\<pdf filename>.PDF" PARAMFORM="NO" BACKGROUND="NO" SERVER="r6i.world" TOLERANCE=0 ADVCODE="<param>"
    OperatingSystemCmd: Command returned 3
    WrsRunReport: Done executing report
    WrsRunReport: Error running report Return code 3
    Error on Screen is REP-0178 : Cannot connect to reports service.
    However running the same command from a operating system command prompt in windows reveals that the command runs successfully.
    Is there any particular OC4J J2EE settings that are required to get this statement to run properly?
    Any help is most appreciative.
    Cheers
    Rodney

    Hi All,
    From much research and experimenting to get this to work I looked at the java.lang.Runtime class and noticed that seperate processes can be started using this very important Java class.
    The first thing that I experimented with was in regards to seeing the environment OC4J runs against. Using the java.lang.Runtime class I executed a standard "cmd /c set" command in my Windows environment, and noticed that Oracle Application Server uses its own environment and not a standard windows login environment for its OC4J containers. Apache Tomcat on the other hand uses the standard user login environment.
    So to get the application to be able to work properly we needed to override the particular environment the process needed to be able to get it to work. There is a exec command which allows you to override completely the environment for a process you would like to run. This method call does not in any way shape or form change the standard OC4J environment. This was done by executing the same "set" but with the overriden environment. Note that no environment variables from the OC4J container are carried into this new environment.
    Cheers
    Rodney

  • Windows system exec error in application causes app to crash

    The basics:
    LabView 11.0 (32-bit)
    Windows 7 enterprise
    Because I have to control an elevated app I run my built app elevated on a Win7 64 machine.
    I have an application that uses the system exec.vi (attached) to get a portion of the arp table. When I run this in development it works great. However when I build an app and run it this vi causes the app to be unstable and crash.... sometimes. I have a troubleshooting vi that I wrote that I place at the start and end of vis. This puts a log file on my desktop so that I can trace where it crashes. I've attached the log as well.
    Basically we have a power controller that we control by Telnet but 1st I have to get the IP. I have the MAC of the controller which is DHCP but not the IP. To get the IP I fill the ARP table and search it for the MAC.
    get ARPCache.vi throws the error messaage: System Exec.vi . Command was "cmd /c "arp -a | find "192.168.120"" but only in the built app.
    Update: While getting more info to complete this post I did a build where I changed "get ARPCachs.vi" to show when called so I could see the error cluster. Now it pops up but no errors. hmmm
    Norm
    Attachments:
    get ARPCache.vi ‏22 KB
    Log program message start finish.vi ‏24 KB
    Program Log.txt ‏2 KB

    It depends on how the exe deals with the arguments. Some do honor escape characters, some not.....
    Afaik, there is no difference regarding the System Exec in development environment vs. exe. But it is possible, that these are executed using different user rights?
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Question about calling batch file by using the System Exec+.vi?

    Hi
    I have a problem about calling batch file. I know that the system exec is equivalent to "run" in Windows. I called the batch file c:\rtxdos\bs\ch0.bat successfully in the "run" but it didn't work in the LabVIEW program. The dos prompt had an error message "Bad command or file name" and it just happen when I call this batch file in LabVIEW. Why?
    Bill.

    Hi,
    Try to set the "working directory" parameter of System exec.vi to the directory where the batch file is located. It may help.
    Good luck.
    Oleg Chutko.

Maybe you are looking for

  • Copying Fields from one PDF to an Updated PDF - can't move fields on destination pdf

    I'm using Word as the authoring software for a PDF.  In version 9, I never had problem copying fields from one to another.  But in Version 11 I copy them to the new revised form and the fields won't move.  I can't move them with the mouse or the keyb

  • MySQL Expert Required!! Advanced Query Problem

    I am currently developing a hotel booking system for my University final year project and am having some serious problems with my query to calculate room availability. I felt the best method to calculate room availability was to first calculate which

  • InDesign Crashes When Exporting a .PDF

    I am having a horrible time dealing with Adobe InDesign. I paid $2,500 for the Master Collection and cannot get InDesign to export a simple PDF. I called adobe but all they'll willing to do is forward me to this article (http://kb2.adobe.com/cps/499/

  • Deploy in CONS

    I am working with scenario 2+. When I make a correction in the CONS system, I check-in the changes to the DTR, activate the activities and release to the transport. When exactly these changes are deployed to the CONS system? I made a change in a WebD

  • Jam pack not installing please help

    guys im trying to install my jam pack but it get an error that there were errors and to try again later, please i want to install the jam pack of course, whats wrong?