Exec System

I have problems with the system Exec.vi in my stand-alone application. Here's the scenario:

I use the Exec.vi system with a command "devcon find = ports" to find all the COM ports that are connected. When I run the program in LabVIEW, I am able to see all of my COM ports. It works very well.

When I run the app on my computer, it is not error. No COM ports are returned in the result.

I then right-click on the application and select "Run as Administrator". The program works and generates the same COM ports that I see when I run the program in LabVIEW.

Is there a way around this problem? I read in manifest files but was not able to figure out how to do what he asked. Even then, didn't know if she could fix my problem. Manifestos seem to ask the admin user right of access, rather than run the program as an administrator...

Thanks in advance for your help.

Thank you very much for your help!

Tags: NI Software

Similar Questions

  • FFMPEG Exec System

    Hello!

    I am trying to merge the audio and the video previously acquired in labview, and I can do with the FFmpeg tool by typing

    'ffmpeg-i video.wav-i video.avi - c copy sortie.avi' on the console of FFmpeg.

    I want to do it by programming, so I think I need to use the Exec System utility. I tried this:

    But it does nothing. I think that I do not line correctly. Do I have to set the control in the entry standard as I do in the Console of FFmpeg command line?

    If someone could help me, I would be greatfull.

    Thanks in advance for your time!

    Guille.

    Hello

    Maybe you could try to test the Exec.vi system using simple commands.

    Read this link: http://digital.ni.com/public.nsf/allkb/8E19CA81874FFDD786256BE40066C151 , in my opinion, there are 2 screenshots which shows the 2 different methods to write using system exec command. What I can see on your screen, is that you use both at the same time. You try to use the method that is in the link (1 screenshot) instead?

    Here is an example that you can see and play with: https://decibel.ni.com/content/docs/DOC-1109

    Warm greetings,

    Lennard.C

  • How to hide the command prompt window when using exec system

    Hello, I use the exec system VI to do some transfers of files for a LabVIEW application.  I'm afraid that the black white scroll text command prompt window that appears when exec system is called might scare users this LabVIEW application non-tech savy.  Is there a way to hide the command prompt window?

    Feed a REAL running reduced entry.

    Mike...

  • Call and open an external Excel with exec system vi

    Hello!

    I would like to know how I could call and open an external Excel with the exec system vi. I am able to call a txt file, but I can't do it with an excel file...

    Thank you very much in advance.

    It should work like any other file, it opens in the default program for the file extension that if you double click on it.  Here is an example if code that I use.

  • Exec System does not work in the executable file

    Once again I have to do something stupid!

    I use the Exec System to start/stop services. It works fine on my development machine, but on a stand-alone pc only Runtime installed with a license, he simply could not start/stop services!

    I did some research and found it we configure the executable file or an alternative is to use .net to achieve this goal. I couldn't stick with Exec System to achieve this?

    Thank you very much

    Waris K

    Sounds to me like a permission error - you are running as an administrator on the development computer, but as a less privileged user on the other computer? Exec system returns an error (try adding a simple error handler)?

  • Updated in real-time with text of exec system indicator

    I was wondering if anyone knows how to get LabVIEW to update an indicator of text with information from a command prompt in real time?  So, as if you ping IP show he ping and not just wait until the end to update it.  I try to have a batch file that processes the code displayed on screen so that the user can see that she is running and that it is not frozen.  When I ran the test originally she had a cmd window pop up and show that information was passing.  Since I opened the program with the exec system, it no longer displays anything so I thought that if she showed in a text indicator the problem could be solved.

    Thank you

    Derek

    Help for the system Exec VI

    (Windows) To use a DOS command, insert cmd /c before the command.

    Then try this way the system Exec VI

    cmd /c 172.18.81.54>"C:\temp.txt ping.

    Change the IP address to your needs.

    The quotation marks around the path is necessary if you have spaces in the path of the file.

    Now when you do this you will get nothing back from the exit of stardard, because you have redirected it.

    The results should be read from the file.

  • to end a process in exec system via ctrl + c

    I run a process in the command that is invoked by exec system window. The only possible way to complete and return to the main command window is via Ctrl + c. How to implement it?

    No idea...

    I solved it... was easy enough.

    Create a digital constant corresponding to the CTRL, convert U8 and kind of climbing and use the output of the channel and paste in the command prompt.

    Works well...

  • exec system runs not the command copy

    Hello

    I am trying to copy a file in the Windows\System32 folder to my project folder, but when I try to do that you use the command copy to system exec.vi, I get the following error: the system cannot find the specified file.

    Does anyone know how to fix this? I have attached the vi here.


  • EXEC System ERROR 1045 (28000): access denied for user 'ODBC'@'localhost' (password: NO)

    I am dynamically creating a MySQL database from a SQL script file, when I call the Exec VI system I get the above error

    my order entry looks like this:

    "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe"

    my standard input entry looks like this:

    "- defaults-file = C:\ProgramData\MySQL\MySQL Server 5.5\my.ini"uroot -""-Ppassword.<>

    If I paste the entire command in a CMD window, it works very well, my db is created (all quotes are included)

    If I try to convey the just the input of the command mysql simply view help info - no error.

    someone has an idea how I can get this working?, oh I'm using LabVIEW 2011 SP1

    TIA

    Hi DogOnWood,

    LabVIEW inserts the default escape characters in string constants.  This can be change your chain one waited one way when it goes off at the command prompt.  Try right-clicking on the string constants that you are entered into the system Exec VI and turn it on '-' option to display Codes on the shortcut menu.  Look carefully at how the escape codes are used to ensure that the correct channel is sent to the command prompt.

    When you use options as a result of a call to an exe file, a common method that works for people is to create a batch file with the file name and the options specified on the inside.  You can then call the file of commands directly from the system Exec VI.  This is described in the system Exec VI Help file:

    «To run an executable with options by using the syntax filename.exe - option1-option2, create a fichier.bat that calls the executable with the syntax of options and use this VI to call the fichier.bat.»

    In this case, you can programmatically create a batch file using the writing of text file VI first with your orders and then use system Exec to run the file:

    Write to help the text file - http://zone.ni.com/reference/en-XX/help/371361H-01/glang/write_characters_to_file/

    Ideally, we recommend the Database Connectivity toolkit for LabVIEW use to connect to databases, as he takes care of all that for you.  You can find more information on it here:

    Database connectivity - Kit http://sine.ni.com/nips/cds/view/p/lang/en/nid/209060

    Kind regards

  • closing the window BACK to exec system

    Hi, I used the exec.vi system to run a program, wait for the program to end and then run it again with slightly different input parameters. This occurred hundreds of times and works OK except sometimes the program crashes and the DOS window is just sitting there until you manually close.

    To stop I want to detect how long the program will run for and if it is more than 5 minutes, force it to close.

    Detection of how long the programme is for is not a problem, but I don't know how to force the window to close LabVIEW...

    can anyone help?

    Thank you

    Philippe

    Try:

    Taskkill /f /im wmplayer.exe

  • File name length is limited to exec system

    Hi all

    When I use exec creat record system, I find folder name length is limited as long as 8 characters. Is there a way to break this limit?

    Whether you use the old "command.com" instead of the new 'cmd.exe '.

    If you replace command.com by cmd.exe that your original method would work.

    Using LabVIEW again would be a better option, however.

  • Why do I get an error when I call tool captures with Exec System?

    Hi all, I want to call Snipping Tool of LabVIEW by using System Exec VI, but I always get an error 2. This doesn't happen when I call other executables like calculator or painting; I hope someone can help me or tell me why this error occurs.

    Thank you in advance, I have attached some pictures of the VI I've done so far.

    Hey there;

    I assume you are using the command: SnippingTool or SnippingTool.exe, just like you would use mspaint. but it's giving you 2 error; It's a matter of Windows than a LabVIEW, you can try to use the 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

  • Exec System return codes

    Hi all

    I'm trying to open a .exe of labview in windows.  When I send the command to the exec vi system I get the return code

    -1073740777

    Anyone know what this means?

    Thank you


  • Exec system displays an error popup

    Hello community,

    in some cases, I need to stop, and then restart outlook. So if I have a batch file that I want to get rid of and all do LabVIEW. When I run the following excerpt I get a popup error complaining that the path is not valid. Which is true, because on some computers in the program folder outlook files, in some computer she is in the program (x 86) folder, but this isn't a problem because the 'IF EXIST'. It worked very well for the batch file.

    Please help me out here.

    Thank you!

    PS: I know that this is not the right way. I would use activeX, but I have not found a way to actually start outlook. (I need to have opened it, not only by sending an e-mail with activeX)

    My outlook.exe is located in C:\Program Files (x 86) \Microsoft Office\Office14.  I got the error you mentioned when I ran your snippet (corrected for office 12/14), but had no errors when I removed the third item in your array.  It seems that ProgramFiles is skilled enough get the (x 86).  I have a C:\Program Files\Microsoft Office\Office14 folder, but there is no outlook.exe inside.

    I found this on Stack Overflow

  • System vi exec path problem

    Hello

    I have a problem with the exec system vi. As a first step; program work and the reason why I write here is what I want to do a little more functional program and remove an annoying bug.

    My front panel consists of two buttons, two controls of path, control of an image and a single string indicator. I intend to use this vi to enumerate CCD cameras on my computer, select on of them and acquire an image and then display them on the front panel. This is accomplished by the two external exe files calls via the exec system vi command. In the block diagram, I arranged the two calls into a structure of event encapsulated by a certain time so I can make calls during execution using two loop buttons.

    The first button is used to acquire images of a CCD camera. When I push the first button ('acquisition') the path of the first control path (pointing to the executable file of the program acquisition) is sent to an exec system vi (the path) and the separate folder name and collected image is then displayed in the controller of the photo.

    The second button is used to list the cameras available on the computer. In the same way that through the acquisition of power to an another exec system the chain of path from the second controller path is vi that lists the cameras and displays them in the text box.

    Now to the problem. When I start the program I select the two executable in their respective path controls, for example the exe of CQI, followed of the exe of the enum. If I press the CQI exec system VI associated with this path is started and the image appears. If I then press the button enum cam I get a file dialog box that wants me to locate the executable enum (even if the correct path is specified in its corresponding path control). If I select the path (again) when the dialog box is prompted the program works very well and the cameras listed are presented in the indicator chain. But if I now press the purchase button a dialog box if poster asking me to locate executable CQI and when I do, the CQI works very well, but yet, I can't list the cameras until I specify this control of trajectory.

    So, it seems that the correct loading of an exec system depend not only on the provided path, but also the path most recently loaded to any control of trajectory if there are several system exec.

    I am grateful for any help provided. Hope my question is clear enough and not specific.

    I run labview 8.6

    / Mikael

    You are stripping the path you're providing and send just the name of the file in the command line. This assumes that the command window has the defined PATH environment variable so that the executable can be found. You can't assume that. You should be by specifying the full path to the executable file as the command line. Be sure to include the path in quotes.

    A comment about code: what's the point of this loop? It doesn't do anything. Or the frame of the sequence. You don't want a structure of the event to be stowed until something happens. If you start something that could take a long time, then you should look through architecture such as the producer and consumer. You want the structure of the event to finish quickly, so you can continue to respond to the events.

Maybe you are looking for