External exe launched in a rectangular region drawn

Hello,
Please find an attachment. Kindly have a look on .uir file in the example. If i want to launch any external exe say e.g cmd.exe in the rectangular region drawn, what will be way of doing this as i am unable to launch .exe in the rectangular region specified.
Thanks & Regards.
Moshi.
Attachments:
Example.uir ‏2 KB

Moshi,
You can use pipes to do this, though when I tried this I couldn't get a reliable solution. I abandoned pipes and simply coerced the output into a file that I then read in. This is a very crude solution and I suspect isn't very future proof but it works in W7! Code below might help:
  sprintf (Cmd, "\"%s\" > \"%s\"", BatchFilePath, OutputFile);
  Ret = system(Cmd);
  if ( Ret < 0)  
    //file is not there   
    sprintf( Msg, "Can't run %s, error: %i", Cmd, Ret);
   return Msg;

Similar Messages

  • External applicatio​n or exe launched within my own software environmen​t

    Hello All. 
    I want to launch external application or .exe file within my own software environment. I know the way of launching external exe file but it runs on a separate window above my software. All i want is to launch the exe not in a separate window but within premesis or window of my own software in a defined rectangular area. What will be way of doing this?
    Thanks & Regards.

    Hello,
    Please find an attachment. Kindly have a look on .uir file in the example. If i want to launch any external exe say e.g cmd.exe in the rectangular region drawn, what will be way of doing this as i am unable to launch .exe in the rectangular region specified
    Thanks & Regards. 
    Moshi.
    Attachments:
    Example.uir ‏2 KB

  • How to create a button in a interactive document and use the button to launch and external "exe." file.

    I created an interactive document and will export as a swf.  I would like to create a button in the interactive document to launch and external "exe." file. Is this possible.

    You will need to create custom web part editor. Look at the following example. It also have added button and its events. I am sure you can use this sample as base and code your logic.
    http://msdn.microsoft.com/en-us/library/hh228018(v=office.14).aspx
    Amit

  • Cannot launch external exe

    Hi,
    I have to launch and external exe.
    The exe "ComputeRay" is working when I launch it from the command window as shown below.
    But when I try to launch it with system ("ComputeRay") I get the error file not found (-3).
    How could I make it work?

    I may be wrong, but it's my opinion that using two consecutive calls to system () is equivalent to open a command prompt, call the exe, closing the window, opening a new command prompt and calling the other program.
    The easiest solution could be to add the last call inside the batch file make one call only to system. Alternatively you could try editing environment variables like PATH with _putenv () function. You could also try to edit _default.pif file (or whichever is its equivalent in Win7/8 OSs) as described in the help for system ().The last resource could be to permanently set environment variables in your system as described in this guide. 
    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?

  • How do I execute an external .exe?

    easy question I hope.
    I'm just making a front-end program with some buttons on it. You push a button, and when you do, an external EXE is called.

    Here is something that should help. Runtime.exec() is actually quite complicated even though it's interface is seemingly not (hinting that it's a bad API design):
    You should be able to fill in any missing external references w/o difficulty.
    package com.solutions400;
    import java.util.*;
    import java.io.*;
    import java.util.logging.*;
    * Wraps the complexities of Runtime.exec().
    * @author  Joshua Allen
    * @created December 10, 2002
    public class RuntimeExec
         private static final Logger myLog = SystemDetails.log();
         private Process myProc;
         private StreamGobbler myErrorStream, myOutStream;
         // Access is synchronized so that the check and interrupt call can be an
         // atomic action.  Hence the reason for not using Boolean.FALSE.
         private MutableBoolean myIsWaiting = new MutableBoolean(false);
          * Number of milliseconds to wait for a process to finish before
          * interrupting it when getting the output and/or exit value.
         public final static int TIMEOUT = 1000 * 60;
          * Value returned by exitValue() if the process did not terminate before the
          * timeout and hence true exitValue is unknown.
         public final static int EXIT_VALUE_INTERRUPTED = -999;
         public RuntimeExec(String command)
         throws IOException
              Runtime os = Runtime.getRuntime();
              myProc = os.exec(command);
              myErrorStream = new StreamGobbler(myProc.getErrorStream());
              myOutStream = new StreamGobbler(myProc.getInputStream());
              myErrorStream.start();
              myOutStream.start();
          * @return stderr ouput from command.  Will only wait at most a minute for
          *     the
         public String getError() {
              try {
                   myErrorStream.join(TIMEOUT);
              } catch (InterruptedException e) {
                   myLog.log(Level.FINE, "Joining interrupted.", e);
              return myErrorStream.getOut();
          * @return stdout output from command. 
         public String getOut() {
              try {
                   myOutStream.join(TIMEOUT);
              } catch (InterruptedException e) {
                   myLog.log(Level.FINE, "Joining interrupted.", e);
              return myOutStream.getOut();
          * @return exit value of command.  EXIT_VALUE_INTERRUPTED if the process
          *     was interrupted before it terminated.
         public int exitValue() {
              final Thread thisThread = Thread.currentThread();
              Thread t = new Thread() {
                   public void run() {
                        Helpers.sleep(TIMEOUT);
                        synchronized (myIsWaiting) {
                             if (myIsWaiting.get()) {
                                  thisThread.interrupt();
              t.start();
              synchronized (myIsWaiting) {
                   myIsWaiting.set(true);
              waitFor();
              synchronized (myIsWaiting) {
                   myIsWaiting.set(false);
              try {
                   return myProc.exitValue();
              } catch (IllegalThreadStateException e) {
                   myLog.log(Level.FINE, "Process did not exit.", e);
                   if (myLog.isLoggable(Level.FINER)) {
                        myLog.exiting(Runtime.class.getName(), "exitValue",
                                  new Integer(EXIT_VALUE_INTERRUPTED));
                   return EXIT_VALUE_INTERRUPTED;
          * Waits for the process to finish.
         public void waitFor() {
              try {
                   myProc.waitFor();
              } catch (InterruptedException e) {
                   myLog.log(Level.FINE, "Waiting interrupted.", e);
         private class StreamGobbler
         extends Thread
              Reader myIn;
              CharArrayWriter myBufOut = new CharArrayWriter();
              StreamGobbler(InputStream in)
                   myIn = new BufferedReader(new InputStreamReader(in));
              public String getOut() {
                   return new String(myBufOut.toCharArray());
              public void run()
                   Writer out = null;
                   try     {
                        out = new BufferedWriter(myBufOut);
                        char[] buf = new char[SystemDetails.BUF_SIZE];
                        int numRead;
                        while ((numRead = myIn.read(buf)) >= 0) {
                             out.write(buf, 0, numRead);
                   } catch (IOException e) {
                        myLog.log(Level.FINE, "Error retrieving output.", e);
                        PrintWriter pw = new PrintWriter(out);
                        e.printStackTrace(pw);
                   } finally {
                        Helpers.close(out);
         }///:>
    }///:~

  • Problem met when call external exe in jar.

    hi all,
    in my java project, i call an external exe . i met a problem that sometimes the exe is not fully finished. How could i confirm that the exe is finished before i start to use the output of this exe.
    i use following code to call the external exe:
    Runtime.getRuntime().exec(command).

    Hi Avm,
    thanks very much.
    The simplest answer is that
    getRuntime().exec(command).waitFor() will help you.
    But besides of sync there are number of other
    potential problems with Runtime.exec
    Good examples and description there is here:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-
    traps.html

  • How To Run An External .exe File With Command Line Arguments

    Hiya, could anyone tell me how I can run an external .exe file with command line arguments in Java, and if possible catch any printouts the external .exe file prints to the command line.
    Thanks.

    Using the Runtime.exec() command. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to run an external .exe file from an indesign pluging

    Hi,
          Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.
    Thanks,

    I'm actully writing data in PMString to a external txt file.
    another question..
    if i want to execute an action when the ok button is cliked how can i do it?
    whe i add a button(widget) i know how to handle it. please see my code.
    // Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).
    CDialogObserver::Update(theChange, theSubject, protocol, changedBy);
    do
    InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());
    ASSERT(controlView);
    if(!controlView) {
    break;
    // Get the button ID from the view.
    WidgetID theSelectedWidget = controlView->GetWidgetID();
    if (theChange == kTrueStateMessage)
    //if (theSelectedWidget == kEXTCODGoButtonWidgetID
    switch(theSelectedWidget.Get())
             case kEXTCODGoButtonWidgetID:
      this->ViewOutput();
      break;
             case kEXTCODFindButtonWidgetID:
      this->SaveLog();
      break;
    // TODO: process this
    } while (kFalse);
    I do two actions "SaveLog" & "ViewOutput()" using two buttons. But i dont know how to execute an action when the ok button is clicked...

  • How can I call external exe in java

    Hi ,
    Is It Possible to call external exe in java.
    I read Runtime.exe("some exe") but actually my exe expects some input to process for that how can i pass the input to my exe and how can get the response from exe to my java class.
    any sample code is welcome.
    Thanks
    Babu H

    example
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.io.*;
    public class RuntimeExample extends JFrame {
        private JTextArea textArea;
        private JTextField textField;
        private PrintWriter writer;
        public RuntimeExample()
            init();
            initProcess();
        public void init()
            textArea = new JTextArea(20, 80);
            textArea.setEditable(false);
            textField = new JTextField(30);
            textField.addKeyListener(new KeyAdapter()
                public void keyPressed(KeyEvent event) {
                    if (event.getKeyCode() == KeyEvent.VK_ENTER)
                        if (writer != null)
                            textArea.setText("");
                            writer.print(textField.getText() + "\r\n");
                            writer.flush();
                            textField.setText("");
            Container container = getContentPane();
            JScrollPane scrollPane = new JScrollPane();
            scrollPane.setViewportView(textArea);
            container.add(scrollPane, BorderLayout.CENTER);
            container.add(textField, BorderLayout.SOUTH);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            pack();
            textField.grabFocus();
            setVisible(true);
        public static void main(String[] args) {
            new RuntimeExample();
        public void initProcess()
            Runtime rt = Runtime.getRuntime();
            try
                //Process p = rt.exec(new String [] {"cmd", "/C", textField.getText()});
                //textArea.setText("");
                //textField.setText("");
                Process p = rt.exec("cmd");
                writer = new PrintWriter(p.getOutputStream());
                Thread thread1 = new Thread(new StreamReader(p.getErrorStream()));
                Thread thread2 = new Thread(new StreamReader(p.getInputStream()));
                thread1.start();
                thread2.start();
                System.out.println("Exit Value = " + p.waitFor());
            catch (Exception ex)
                textArea.append(ex.getMessage());
                ex.printStackTrace();
        public class StreamReader implements Runnable
            InputStream is;
            public StreamReader(InputStream is)
                this.is = is;
            public void run()
                try
                    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                    String data;
                    while ((data = reader.readLine()) != null)
                        textArea.append(data + "\n");
                    reader.close();
                catch (IOException ioEx)
                    ioEx.printStackTrace();
    }you can pass input to the exe by using getOutputStream() from Process and get the output from getInputStream() from Process

  • How to execute external exe in SSIS Package

    Hi,
    I wanted to know how to execute external exe from SSIS Package can any one explain me or provide me valuable links.
    Regards ,
    Ajay

    There are few things you need to take care before executing exe from SSIS
    1. The arguments etc expected by exe should be clearly defined inside execute process task
    2. The Path where exe exists should be accessible to the account executing the package. SO you should grant account required permissions
    3. If executing from a job make sure you either define a proxy account with required permissions and configure it to run the job or give service account all access required for executing exe
    see
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can you call external exe file from Flex Air Application like notepad.exe

    Im trying to make my Air Application open an External exe file anyone know if this can be done?

    Hi,
    If you want to share code between a flex app and AIR, you
    could isolate the common bits as a swc file and link to the swc
    from both the flex and air project.
    Also, you could have the flex mxml file and air mxml file
    load the same module (which has the same stuff as your original
    flex application) using ModuleLoader.
    Or, you could even load the swf of your flex application
    using SWFLoader in your air mxml file.
    Basically, check out creating flex libraries, modules and
    runtime loading of swfs.

  • Rectangular region of osccilating blue and beige (yellowish) pixels

    I have a white Macbook (Mac OS X Tiger). Recently, I've noticed a strange rectangular region near the left side of my Macbook LCD display partly filled with oscillating blue and beige pixels. At first it was only a few pixels (and a small region) so I thought it was a negligible, but now it spans the entire vertical length of my macbook display near the left side (approx. 2 inches wide horizontally). I know it can't be stuck pixels or dead pixels because they seem to conform around dark areas and react to mouse pointer position. For instance, if I am watching anime the blue pixels seems to surround the character's defining features like their hair and nose (only at the region described above). I wish i could take a screen shot, but its not a software problem. I only got my laptop on the August of 2007 from my school. I was wondering if anyone else has this weird problem. I would also like to know if it's caused by pressure applied to the closed laptop (which is kept in a nice black cover) which is kept safely within my school bag everyday I go to college. If this is the problem, Apple should consider making more durable laptops that can withstand daily travel or at least me . If you need more information about my problem please post, and if you have suggestions, definitely post!
    null

    I too am getting this problem but it's on the middle to right side. I get a 2 1/2 inch vertical blueish/purpleish speckled bar. I have no mouse or any control at that point. It has happened twice, each time when I do a restart. Each time I took out the battery, tried a few things as per phone support to no avail but when I waited a bit and then started it up it was fine again. Very strange. Purchased July '07. I will be sending it back but I need to purchase a desktop first as I can not be without for a week or two.
    If any help is found please advise here. Thank you.

  • Starting an external .exe application from within Visual Basic

    How do I start an external .exe appliction from within Visual Basic. for example start Internet Explorer or FireFox?
    Thanks in advance
    Big Buzzard
    Philippe de Marchin

    How do I start an external .exe appliction from within Visual Basic. for example start Internet Explorer or FireFox?
    If you know the path and filename of the application, or if it is an application that the operating system will find for you, then you can pass the application details to the Start method of the Process class.   If you don't know the path and filename
    of the application - for instance you want to start the user's web browser but it might be IE or Firefox or something else, then the argument to the Start method can be of any file type for which the extension has been associated with an application installed
    on the system. 
    https://msdn.microsoft.com/en-us/library/53ezey2s(v=vs.110).aspx

  • DVD with external exe file

    Hi all,
    Is there any solution to call an external .exe application such as a game, from a DVD created in a MAC ? (Like with a menu inside DVD with a button and call the game with .exe or other extension for PC)
    I know it can be done with DVD@ccess and it works, unless you install it first into the PC.
    I've tried it with Flash CS5 but from what I saw it can't be done (at least for a rookie like me) is there any other application to create it?, (it would be great if could be done all with authoring, without going to an external application).
    Thank you all
    Mario

    Hi Shawn,
    DVD@cess did the job (PC and Mac), the only problem is that I need the DVD for commercial purpose (children/kids use), so it's rather annoying telling people to first download the program and install it for the DVD to get access to the interactive content ... for a single client it's ok.
    The way I'm doing it's what everyone is doing around here, to put a batch file like autorun in the DVD root, to be the first thing to do (reading the exe file), but I can't get access to the DVD content if it's first open as an executable file ... and can't open the exe file either if it's open by a PC DVD player, this will only work on a PC because it's a exe file (maybe there's a way to do this with an autorun and .app file for MAC, I will search for it).
    Anyway thanks for the input and advice, I know it's a rare situation, but I need the game to work ... maybe in another version of DVD studio pro
    Thank you
    Mario

  • How to Run External Exe/Scripts

    Hi,
    I am new to Java. I am doing a GUI Application Using Swing. I want to execute list of external exe or perl script repeatedly from my Application. I Tried that one using in for loop. within the for loop i write execute my external exe or script. I got the expected result. but my problem is I can not interact with the application on the of loop execution. Any one can Give me a Solution?.
    Here is my Try..
    Runtime rt = Runtime.getRuntime();
    Process pr ;
    String ScriptPath
    for (int rcount = 0; rcount < trows ;rcount++ ){
         ScriptPath = "D:/Scrip" + rcount + ".pl";
         try{
              pr = rt.exec(ScriptPath);
              exitVal = pr.waitFor();
         catch (Exception e){
              exitVal = 4;
         JOptionPane.showMessageDialog(null, "Status: " + exitVal, "Status" , JOptionPane.ERROR_MESSAGE);
    Thanks,
    Rajesh.K

    You are probably executing you external apps via the Event Dispatch Thread. This is the thread responsible for updating the GUI.
    You need to read up on the SwingWorker class. This is exactly where it should be used.
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    nes

Maybe you are looking for