Running C system exec in executable

I built a Labview program that calls a C code using system exec (connectivity->Libraries and executables->system exec.vi).
I uses Labview 8.0.When I run this program I can see the C window (console) when it runs. Now I have created an exe file to this Labview program to run it on computers wich do not have Labview installed on them. But when I run the program on such computer, I don't see the C window and I do not know whether the C program executes or not. How can I see the console?

Hi Dror!
  I think that C program doesn't run....
   I think it's a problem of the installer you created (if you created one, of course...).   I use LV 7.1, but I hope it will be good also for 8.0.  When you launch "build application",  (tools-> build application), you go to "source files" tab, and you add the .exe file you need ("add support file..." button, then you just search for it). 
   There're further settings about this, that is where do you want to install this file.  When you decide where to install it, it'll be a matter of "System exec.vi" to call it from the right path, that you can wire to "System exec.vi".
   Maybe, another solutions is to set path environment variable to windows to point at your executable, but I think it's not the best solutions....
   Maybe I'm missing something, please let me know if this helps!
graziano

Similar Messages

  • Simulate Keystrokes for an executable run by System Exec.vi ?

    I have an executable that I call using System Exec.vi. The executable opens when I use system exec, but it needs CTRL + S to run. So I want to simulate that keystroke. Also, once it completes, I want to simulate keystrokes to close. In short, I do not want the user to do anything other than run the VI which has system exec.vi. Everything else is done by simulating keystrokes which in turn depend on some conditions I would generate. Thanks.
    Kudos always welcome for helpful posts

    The attached vi shows how to simulate keystrokes. Send the Control Key down code, S key down code, S key up code, then control key up code.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Keystrokes.vi ‏39 KB

  • CMD.exe is still running after System Exec.vi

    Hi,
    I'm currently trying to use the System Exec.vi to launch files and applications by writing the action to do in a constant bat file and calling this bat file( to avoid synthax problems). I've remarked that a cmd process is active while the file or application launched previously is opened. It uses more CPU and sometimes disables the new cmd command passed.
    I've already tried to change the wait until completion constant but, in every case the cmd process only stops when we stop the process it had launch.
    I'd like to know if it's possible to avoid this multiple cmd by killing ther cmd window after it has complete its task?
    I'm looking forward to your answer.
    Thank you in advance.
    Bim

    Please see the link below:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=79683&requireLogin=False
    It should solve your problem
    Regards,
    Sanaa T
    Sanaa T.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> http://www.nidays.fr/images/081110_ban_nidays09_468X60.gif

  • Enter password to a program using system exec

    Hi,
    I have a program that I am running using SYSTEM EXEC.VI. The VI runs ok but asks me to enter a passowrd. If I do this, the VI continues and completes the test. My question is... how can I add the password automatically using SYSTEM EXEC.VI without the user typing it in. I have tried a carridge return and then the password (in the comand line) or even typing the password into the STANDARD INPUT and have even tried creating a batch file but no luck
    regards
    Chris
    Attachments:
    1.jpg ‏141 KB
    2.jpg ‏57 KB

    Maybe this will provide a clue:
    http://superuser.com/questions/44106/is-there-a-way-to-auto-login-in-putty-with-a-password

  • Call an external executable through system exec.vi. Problems:

    I have a executable (Fortran i think). I am using System exec.vi to call it and execute. I write a .bat file to configure the execution. It executes fine, but the executable pops up whenever labview calls it. I want to suppress the executable pop-up. Any suggestions ? Do i need to change this in the .bat file or is there any utility in Labview ? Let me know.
    Kudos always welcome for helpful posts

    Thanks for your reply. I guess I've not explained the problem properly. I run like 10 iterations, for each iteration a window pops up, some calculation takes place and it closes. This happens for 10 iterations. What I want to do is suppress that window from appearing to the front end user. I want all processes taken place in the background.
    Kudos always welcome for helpful posts

  • System exec running C code

    I am running C code using the System Exec vi.   It executes some of the code and the stops.  The code executes from the terminal everytime without a hitch.  Could there be a conflict between system calls in C and the System Exec?  Other ideas and suggestions are appreciated.

    How do you determine that it stops? What does happen and what not? Do you have control of the source code of the command line tool, so you can add console output to debug what happens?
    The most likely reason is that your program expects certain conditions, such as process authorization, environment settings, etc, that are normally existent for a console style application started from the shell, but not as child process when started from a GUI application. The process started with SystemExec inherits all its environment, authorization and what else from the LabVIEW process and not from the unix shell, that you would normally use to start a consolde application. This has usually no consequences and in Windows it actually didn't make much of a difference until Vista was released. Under Unix/Linux things can be a bit more complicated as some of that security was built in from beginning.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Calling a VI which uses "system exec.vi" with LabVIEW run-time engine as adapter

    Hi,
    My TestStand sequence calls a VI which includes a call to "system exec.vi". When I try to load it in TestStand and if LabVIEW adapter is set to run-time engine, I get an error message "Unable to load Vi...". If I switch the adapter to "Development system", then it works fine.
    Is there any way to use "system exec.vi" in a VI which is called in TestStand with LabVIEW run-time ?
    Thanks,
    Alex
    Solved!
    Go to Solution.

    Hi Alex,
    In you case, you are getting a -18002 error.
    The reason is explained in the following link:
    -18002 Errors in TestStand
    http://digital.ni.com/public.nsf/allkb/D82FEAF0B4BA293A862575710053E252?OpenDocument
    Please have a look at the 2nd reason. This is your case.
    Hope it helps,
    Regrads
    Julien De Freitas / Applications Engineer / Certified LabVIEW Developer (CLD)
    National Instruments Switzerland

  • Is it normal for OS X running on many .exec files inside system library

    Is it normal for OS X running on many .exec files inside system library?
    Because my Mac getting slower.

    Please post a screenshot that shows what you mean.
    To take a screenshot, follow the instructions linked below. Be careful not to include any private information.
    Shortcuts for taking pictures of the screen
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • 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!

  • 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

  • System exec cmd window

    Hello, first time posting a question!
    I have spent a good while trying to find an already posted answer to this, and looking on the wider web, hope i have not just missed it.
    I am using XP Pro SP3, LV 8.6.
    I am not very familiar with Windows command lines and structures etc. 
    I am using the System Exec VI to start a third party piece of software. I have wired the path in to the path input, and if i wire cmd /c start xxx to the command line terminal the VI will run and start the software application (xxx.exe). As the VI executes the cmd window clunks open and closed. If i run the VI without the cmd /c part of the command then an Error 2 is returned (as widely reported by others).
    Is it possible to open an application without the cmd window opening and closing?
    Using the System Exec VI it is possible to open NotePad just by wiring 'NotePad' to the comand line terminal. Is it possible to place the third party software somewhere, or register it with the OS somehow so it could be started in the same way as NotePad (i.e. without the cmd window flashing up)?
    Thanks...
    Blue 
    Message Edited by BlueTwo on 09-25-2008 09:22 AM

    Hi Thoric, thanks for the suggestions, Success!
    I tried the True boolean to the Run Minimized, but it did not help.
    Changing the Environment Path string to include the path to the directory containing the application did work (once i had worked out the syntax).
    On to the next problem....
    Cheers,
    Blue 

  • System exec, How I say to open one file and make operation in external program?

    Hi,
    I got called an external program with the system exec.vi, but i would like the program open the file saved in the other window, i can get the file path, but how Can I put the file path in the external program and the program open the file and I tell (in this case compile), since i open one file code c and only i must to open and say to the program 'compile' and then close external program.
    Any help?. Thanks.
    Attachments:
    system_exec.GIF ‏8 KB

    Hi Fonsi,
    System Exec.vi will allow you to run commands like launching a program easily but it is difficult and many times not possible to execute commands within an application.
    A better way maybe to approach this though ActiveX. Please look at the following example that uses ActiveX to communicate with Excel.
    Writing Rows to Excel 97 and Excel 2000 Using ActiveX
    If you are not familiar to ActiveX and LabVIEW, please read the document below:
    ActiveX and LabVIEW
    I hope this
    helps.
    Sincerely,
    Feroz
    National Instruments

  • System Exec error message help

    I have a piece of code as shown in the attached jpg.  And I have it deployed just as shown, without the error cluster being wired.  I use this piece of code to ping a server to see if it's there, meaning to see if it responds with a correct ping response.  If so, I then move forward with writing a data file to that server that I write every half hour for days or weeks at a time.  If the ping response is not correct, I simply go on and return one half hour later with even a larger (appended) data file to write.  My main intent is to not have my code sit and wait, trying to write a file to a server that might not be there...  
    I've used this same code and technique for years without fail.  Until recently.  When it did finally fail, I got the worst of all possible outcomes where the ping command itself caused my code to hang with error messages I will provide shortly.  And I'm hoping someone can tell me what would even cause a message like those below in the first place...  The entire goal of using this ping of the server was to avoid having the "write file" command get held hostage by the server not being there...  But if the ping command itself causes the code to put up error messages (and no one is there to monitor this typically) then that constitutes a situation where my cure became my problem.  
    See in the jpg where I use
    ping -w 200 -n 1
    followed by the name or IP address of the server.  (that's what comes out of the "ping" control you see in the jpg).
    The -w 200 modifier is a 200 ms timeout to wait.
    The -n 1 is the number (1) of echo requests to send.
    When this code fails, it puts up, in sequence, four messages like the one below.  Note that this code is running from an executable that would be found on this Windows XP machine at
    C:\Documents and Settings\xxxxuser\My Documents\my_executables\
    The first of the four messages, each of which you have to click OK to to see the next one, is as follows.
    The file C:\Documents and Settings\xxxxuser\My Documents\my_executables\-w could not be opened.  No application was found to open that type of file
    The second message is identical to the above except the "-w" is replaced by "200" (without the quotes).
    Same with the third message except the "200" is now replaced by "1" (without the quotes).
    Same again with the fourth message except the "1" is now replaced by the full name of the server, eg., "myserver.abc.com" (without the quotes).
    Clearly the System Exec.vi (see that in jpg) is parsing up the ping command, but skipping over the "-n" component(???), and it thinks it's supposed to try to open some non-existent file at the same file location as the executable that is executing my code.  
    I get this result rarely so it's hard to figure out what's going on.  Anyone have any ideas what might cause such an error and any hints on how to prevent this show stopping error from occurring???  Do I perhaps just need to practice better programming and wire the error cluster on System Exec.vi???  
    Any thoughts or help would be much appreciated...  thanks.. bob.. 
    Attachments:
    ping pic.jpg ‏19 KB

    It appears to me that your ping command is getting mangled on its way to the command shell, like something is interrupting it or trying to run at the same time.
    When it says the executable cannot be opened, I believe that is because it's trying to process that character or string as its own separate command, instead of as a flag of your ping command.
    I don't know why that would happen or what outside program could be interfering with your call to the command shell.
    I do think that Wart's suggestion is a good one: the cmd /c part should send the command through a slightly different channel that may preven this interference.
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • How do you change the directory of system exec after it has ran once in the current vi

    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    Attachments:
    system execute command.vi ‏41 KB

    matt198717 wrote:
    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    I am not sure, if I understand exactly the problem, but do you really need the cmd /c start some_executable.exe. This executes a command prompt window, which executes another command prompt window, where your executable runs.
    You can just use cmd /c some_executable.exe some_parameters_if_needed, and you don't need any quotation marks, even if the executable has command line parameters. I you want that the executable runs in particular directory, wire this path to the 'working directory' of System Exec.vi

  • 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.

Maybe you are looking for