How to call external programs?

I have seen people call external programs through LabVIEW and was curious what functions you could use to do this.
I'm pretty sure its using one of the ActiveX functions  or maybe 'open application reference .vi'.
Can anyone tell me (or show me) a quick example of how to open an external program (ie excel,  notepad, etc) programatically
Cory K
Solved!
Go to Solution.

Cory K wrote:
Where did they get this:
Kudos for going from "I don't know to start" to "Let's stump Ben" with only the second post to this thread.
I either copy it from an example or try to browse to it.
NOTE:
If you plan to work with MS ActiveX objects, I found it very helpful to do a custom install of Office and make sure the help files for VBA are loaded. These will at the least give you an idea of what the methods are and what parameters go with each.
Ben
Message Edited by Ben on 12-31-2008 11:09 AM
Message Edited by Ben on 12-31-2008 11:13 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
Browse.PNG ‏24 KB

Similar Messages

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • To call external program

    I would like to know if exists a way of to call external program in windows ce. I'm using cvm J9.

    I don't know how is configured Windows CE, but Windows ME is MIDP 2.0, and formRequest(URL) do it (but work only since MIDP 2.0).
    It's work, but in my case, i try to add arguments, and it doesn't work with : URL = "/Program Files/MyProg/myProg.exe arg1 arg2". If somebody have found a solution...

  • How to close external programs?

    Hi there,
    in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
    start external programs. But how to  close external programs when
    they finished its work? Is there a vbs-command for it? Is there a way
    when calling "cmd.exe" with a proper parameter?
    Martin Bohm

    Hello Martin!
    Yes, with the tool 'tasklist' in the same directory.
    The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
    If IsDIAdemRunning() Then
    Call MsgBox( "At least one DIAdem is running!" )
    Else
    Call MsgBox( "No DIAdem at all!" )
    End If
    Function IsDIAdemRunning()
    Dim oWshShell
    Dim oExec
    ' Execute via Shell Object
    Set oWshShell = CreateObject("WScript.Shell")
    Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
    ' wait until tasklist is finished
    Do While oExec.Status = 0
    Pause(1)
    Loop
    ' no Standard Output -> no DIAdem running
    IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
    End Function
    A better solution might be possible via WMI.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to call driver program internal table in a form

    how to call driver program internal table in a form? Given below is my code
    TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
    DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
    STREET LIKE ADRC-STREET,
    NAME LIKE ADRC-NAME1,
    POST_CODE LIKE ADRC-PSTCD1,
    CITY LIKE ADRC-CITY1,
    CUST_TIN LIKE KNA1-STCD1,
    END OF IT_CUST_ADD.
    DATA: BEGIN OF IT_IN_DA OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    FKDAT LIKE VBRK-FKDAT,
    END OF IT_IN_DA.
    now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)

    Hi Sashi, this will solve ur problem.
    Check the below link.
    REG:PEFORM IN SCRIPT
    kindly reward if found helpful.
    cheers,
    Hema.

  • How to call java program by HTML page

    Hi guys,
    I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
    I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
    If you have small sample,pls send to me. [email protected], thanks in advance
    Jian

    This code goes with the tutorial from this web page
    http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
    good luck.
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:mySubprotocol:myDataSource";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("myDriver.ClassName");
         } catch(Exception ex) {
         setError("Can't find Database driver class: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,
                                  "myLogin", "myPassword");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

  • Calling external programs from within a Tomcat application

    I've got a fairly complex existing Tomcat application (which is packaged and built as a .war file) which I'm trying to edit so that it calls a Perl script part way through the processing, which will generate an XML file used later on. I think I've worked out how to call external scripts from within Java, but at the moment when I try and access the application via Tomcat the application either hangs or bails out (I don't know which, as the log files unhelpfully don't give any error messages).
    The code which is causing the problem looks like this:
    System.err.println("Calling runtime...");
    Runtime runtime = Runtime.getRuntime();
    System.err.println("Executing process...");
    Process process = runtime.exec("/path/to/ysearch.pl 'News' '\"search query\"' 'file");
    System.err.println("Waiting for process...");
    int exitVal = process.waitFor();
    System.out.println("Exited with error code: " + exitVal);The code gets as far as "Executing process..", beyond that there is nothing in the log file so I presume the runtime.exec() call is where the problem is. I'm not interested in reading the output from the script (there shouldn't be any), so that's not an issue, and the permissions on it allow anyone to read or execute ysearch.pl so I don't think there's a problem in that area.
    Does anyone have any suggestions which I could try to get this to work? I've only been using Tomcat for a week (I'm picking up on someone else's code) so I might have made a beginner's mistake. I'm using Tomcat 5 on Fedora Core 7, and Java 1.5.0_01 (I can't easily change any of those).

    I'm not sure, but I thing that overhead caused by calling du cannot be big enough to matter even on older machines.
    But, when calling du from Perl script you are also invoking shell, and this can be a little bit more 'heavy'.

  • Detective support: how is an external program called? (ex: truecrypt)

    Hello there,
    some of you may know, that if you double-click a mounted container within truecrypt, and have no nautilus installed, that you get an error message saying that nautilus isn't there.
    Browsing through the forums, I found someone who mentioned the exact command that truecrypt was using and consequently a workaround. The command was:
    /usr/bin/nautilus --no-default-window --no-desktop /media/truecrypt1
    and can be found here: https://bbs.archlinux.org/viewtopic.php?id=103882
    My question is, how can I find out how a program is calling another program, as in this example, how could I have found out what is going on under the hood of truecrypt, and what command truecrypt is exactly running for that nautilus error message to pop up?
    Is there a program that can be chained to truecrypt, kind of like "time" as in:
    $ time man
    to monitor for such calls or would you do it different?
    Thanks!

    strace + gdb might be a start
    edit: not necessarily gdb, you'd want to walk through the binary and find the appropriate strings, so strings
    Last edited by fsckd (2011-05-08 13:34:52)

  • How to call external java functions in XSLT Mapping Programs

    Hi All,
    I am unable to call java programs in XSLT MAPPING.
    I tried by following the blog...but getting error :
    XSLT Mapping With JAVA Enhancement ( For Beginners)
    I need some input from you all.
    Waiting For quick reply.
    Rgds Somu.

    i wrote the code...
    and getting error in interface mapping..
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:MyLib="java:datetime.DateandTime">
         <xsl:template match="/">
              <Order DocType="OrderCreate" Version="2.0.2">
                   <Header>
                        <RequestingDocumentIdentifier>
                             <DocumentIdentifier>
                                  <xsl:value-of select="concat('IDOC',//EDI_DC40/DOCNUM)"/>
                             </DocumentIdentifier>
                        </RequestingDocumentIdentifier>
                        <RequestingDocumentDateTime>
                             <DateTime DateTimeQualifier="On">
                                            <xsl:if test="function-available('MyLib:getDateValue')">
                       <xsl:value-of select="MyLib:getDateValue()"/>                   
      </xsl:if>
                                        </DateTime>
                        </RequestingDocumentDateTime>
                        <From>
                             <PartnerInformation>
                                   <PartnerName>BASF SA</PartnerName>
                                    <PartnerIdentifier Agency="AssignedByBASF">
                                     <xsl:value-of select="//E1EDK14[QUALF='014']/ORGID"/>
                                    </PartnerIdentifier>
                             </PartnerInformation>
                        </From>
                        <To>
                        <PartnerInformation>
                             <PartnerName>BASF CORP CHEM DIV</PartnerName>
                             <PartnerIdentifier Agency="D-U-N-S">001307032</PartnerIdentifier>
                        </PartnerInformation>
                   </To>
                   </Header>
              </Order>
         </xsl:template>
    </xsl:stylesheet>

  • How to call external Perl routines from Pl/SQL - Urgent

    Available software in the Test Environment:
    1. Sun Unix 2.8
    2. Oracle 8.1.7 ( 8i)
    3. Perl 5
    Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts.
    The steps followed for for C are -
    1. Create and compile a simple C program to execute a unix command (eg., touch a file).
    2. Make a shared library of the above compiled program (object), i.e., load the compiled object module into a dynamic load library.
    3. Declare the above library in Oracle using SQL*Plus.
    4. Define a PL/SQL function or procedure to call the external routine.
    5. Test the external routine.
    The above steps run good for a C program, but step 2 fails when run for a Perl script.
    When I tried to use the following command for step 2 -
    make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
    SHARED_LIBNAME=cmd_lib.so \
    OBJS=tst_cmd.pl
    got the following error -
    ld: fatal: file tst_cmd.pl: unknown file type.
    ld: fatal: File processing errors. No output written t cmd_lib.so
    *** Error code 1
    This gives me an indication that demo_rdbms.mk does not understand/interpret Perl scripts. Going through the demo_rdbms.mk suggests the same.
    My questions is - How do we call external Perl scripts/routines from PL/SQL ??
    Do I have to get a different version of "demo_rdbms.mk" ?
    PS: The perl scripts used above (tst_cmd.pl) is error free and works as intended in the unix environment.

    Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts. Well, C is a "compiler" language and Perl is interpreted. In a sense, C is not "scripts".
    When I tried to use the following command for step 2 -
    make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
    SHARED_LIBNAME=cmd_lib.so \
    OBJS=tst_cmd.pl
    got the following error -
    ld: fatal: file tst_cmd.pl: unknown file type.
    ld: fatal: File processing errors. No output written t cmd_lib.soI guess this compiles an extproc "stub" with your object file, generating an external procedure. So the object file really needs to be an object file :-)
    My questions is - How do we call external Perl scripts/routines from PL/SQL ??I'd guess you need an embedded Perl interpreter in the external procedure.
    Not much help though I'm afraid :-/
    Cheers
    Fredrik

  • Call external program in background mode

    Hi,
    I am creating a PO using bapi BAPI_PO_CREATE1 in exit USEREXIT_SAVE_DOCUMENT_PREPARE.
    I dont want to write the code in my exit. Instead I want to write the code in a Z program and call it in my exit.
    My Problem.
    How do I call my z program in my exit so that I can pass internal tables from my exit to the z program. Also I want to schedule the call of my external program for background processing.
    I am trying with SUBMIT ZPROG AND RETURN. But not able to pass an internal table.
    I tried PERFORM BAPI_PO_CREATE IN PRGRAM ZPROG, but in this case not able to schedule it in background.
    Please advise.
    Regards,
    Shobhit

    Hi Rich,
    Im setting runtime error:
    My Code in Exit: (xvbfa is the table which i wanna pass)
    concatenate 'SERVICEPO' sy-datum into l_key.
    export xvbfa = xvbfa
                  to shared buffer indx(st) id l_key.
    My Code in the called program ZMM_SERVICE_PO
    Runtime Errors         CONNE_IMPORT_WRONG_OBJECT_TYPE
    Exceptn                CX_SY_IMPORT_MISMATCH_ERROR
    Date and Time          05.12.2005 21:41:54
    ShrtText
         Error when attempting to IMPORT object "XVBFA".
    What happened?
         Error in ABAP application program.
         The current ABAP program "ZMM_SERVICE_PO" had to be terminated because one of
          the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
         When importing the object "XVBFA", the object in the
         dataset had a different type from the target object in the program
         "ZMM_SERVICE_PO" (object types: field, field string/structure, table).
         table).
    Error analysis
         An exception occurred. This exception will be dealt with in more detail
         below. The exception, assigned to the class 'CX_SY_IMPORT_MISMATCH_ERROR', was
          not caught, which
          led to a runtime error. The reason for this exception is:
         The object "XVBFA" has a different object type in the dataset from
         that in the target program "ZMM_SERVICE_PO". (Object types: Field, flat
          structure,
         deep structure, flat table, deep table).
    Missing Handling of System Exception
        Program                                 ZMM_SERVICE_PO
    Trigger Location of Exception
        Program                                 ZMM_SERVICE_PO
        Include                                 ZMM_SERVICE_PO
        Row                                     43
        Module Name                             START-OF-SELECTION
    Source Code Extract
    Line  SourceCde
    REPORT  ZMM_SERVICE_PO.
    DATA: l_poheader      LIKE bapimepoheader.
    DATA: l_poheaderx     LIKE bapimepoheaderx.
    DATA: l_poitem        LIKE bapimepoitem     OCCURS 0 WITH HEADER LINE.
    DATA: l_poitemx       LIKE bapimepoitemx    OCCURS 0 WITH HEADER LINE.
    DATA: l_cond          LIKE BAPIMEPOCOND     OCCURS 0 WITH HEADER LINE.
    DATA: l_condx         LIKE BAPIMEPOCONDX    OCCURS 0 WITH HEADER LINE.
    DATA: l_poschedule    LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE.
    DATA: l_poschedulex   LIKE bapimeposchedulx OCCURS 0 WITH HEADER LINE.
    DATA: l_purchaseorder LIKE bapimepoheader-po_number.
    DATA: l_return        TYPE BAPIRET2 OCCURS 0.
    DATA: l_error_found   TYPE c.
    DATA: l_show_messages TYPE c.
    DATA: l_eindt(10)     TYPE c.
    DATA: l_answer        TYPE c.
    DATA: l_VBAK          TYPE STANDARD TABLE OF VBAK WITH HEADER LINE.
    DATA: l_VBFA          TYPE STANDARD TABLE OF VBFA WITH HEADER LINE.
    DATA: xlips           TYPE STANDARD TABLE OF LIPS WITH HEADER LINE.
    *DATA: xvbfa           TYPE STANDARD TABLE OF vbfa WITH HEADER LINE.
    DATA xvbfa like vbfa.
    DATA: l_key(60) type c.
          concatenate 'SERVICEPO' sy-datum into l_key.
    >>>>> import xvbfa = xvbfa
                      from shared buffer indx(st) id l_key.
          delete from shared buffer indx(st) id l_key.
    Could you help.
    Regads,
    Shobhit

  • How to execute external program in java?

    My question is how to execute an external program in java.
    I need to call a unix command in java.
    Thanks.

    it depends on what you are trying to do. Following are the two methods
    1. Runtime.exec() : this method allows you just to call an external program as a seperate process
    2. JNI (Native Interface) :- As of right now only C and C++ are supported by this method. This method allows you to directly call the C/C++ methods from JAVA

  • How to call external application (transaction launcher) from event method

    Hi all
    Can somebody tell me which program lines to put into an event handler method in a view controller to get an external application called. I intend to define the link to the external application in the Transaction Launcher. But I cannot find any instructions on how to call the Transaction Launcher from my event handler method. I do not want to launch the application from the navigation bar, ONLY via a link in a list of invoices in a table view, and I want to press the invoice number to get an external application called to display the invoice. My event handler method gets called fine enough, but I have no clue which program lines to put into the method to pass on the call to the Transaction Launcher
    Best regards
    Arne Thage / MarchIT / Denmark

    hi,
    check class CL_CRM_UI_LTX_NAVBAR_PARAM.
    call method : CREATE_PARAMETER_OBJECT with parameters
    IV_LINK_ID     Importing     Type     CRMT_UI_LOGICAL_LINK_ID                                                                                Logical Link ID
    IV_PARAMETER     Importing     Type     CRMT_UI_LINK_PARAMETER                                                                                Link Parameter
    RV_RESULT     Returning     Type Ref To     IF_BOL_BO_PROPERTY_ACCESS                                                                                BO Attribute
    I think it should work but have never done myself.
    Best Regards
    Pankaj Kumar

Maybe you are looking for

  • Adobe Reader 8.1.2 for OS-X 10.4.11 with Epson EPL-5900 L  prints only squares

    My iMac with OS-X 10.4.11 installed and using Adobe Reader 8.1.2 prints the pdf-documents only as squares, no words are visible ! Why ? Could someone help me ? Thank you Martin

  • ACD sleep indicator light not pulsing

    I installed Windows Vista Home Basic on my Mac Pro yesterday. My display is a 20" ACD (aluminium). Since this Vista installation, the indicator light on the ACD does not pulse during sleep, but remains on steadily. The front indicator light on the Ma

  • My iPod will not charge.

    When i went to plug my ipod into the charger, the battery came up saying it needed awhile to recharge. So i left it for 4 hours. And when i came back it said the same thing. It has been stuck on this low battery and wont even let me onto my lock scre

  • Project Server 2013 OLAP cube build error

    When I try to build the OLAP cube I receive the below error: [2/26/2014 12:36 PM] Failed to build the OLAP cubes. Error: The attempt to build the OLAP database on server SQL_Server_Name failed, the SQL Server Analysis Services Analysis Management Obj

  • Best Practice Analyzer for Exchange 2013

    Greetings, I have upgraded the messaging infrastructure from Exchange 2007 to Exchange 2013. I want to test the Health of the system through ExBPA for Exchange 2013. But i don't find any setup for Exchange 2013 like it was in 2010. I went through an