LaunchExecutableEx command

I am trying to automate a segger flasher for production testing.  I created a .bat file that runs the jflasharm.exe file with command line paramters.  The .bat file reads the return value from the jflasharm.exe and creates a log file.  If I use the start /min jflasharm.exe to run the file the ExecutableHasTerminated function indicates the program has terminated even though it is still running.  I would like to hide the flasher program in the background and only display my labwindows gui.  Any suggestions?

Hi Joncombat,
What version of LabWindows/CVI do you have? You might be able to find something with the Win32 API Interface to CVI that allows you to minimize windows other than the CVI GUI. See the following links:
http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/windowssdkincludefiles/
http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/availability_win32_functions/
http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/calling_windows_sdk_functions/
Kelsey W.
National Instruments
Applications Engineer

Similar Messages

  • LaunchExecutableEx hides GUI

    Hi,
    I'm writing a GUI which calls a text mode program (DOS), using LaunchExecutableEx
    command. However, the dos window rises on top of the GUI window after printf commands.
    I want the GUI to be active and at front all time.
    I tried to launch the LaunchExecutableEx command with attributes of hide, or inactive, but non of them helped.
    THANKS!
    Hagruzini

    MosheHagruzini:
    Even if the stdio window is hidden, the next printf statement causes it to be displayed.
    You could try using SetStdioWindowPosition() to set the stdio window position offscreen.  See my earlier post here:
    http://forums.ni.com/t5/LabWindows-CVI/How-to-Close-Standard-IO-Window/m-p/978102#M42849
    If, after doing that, you have a problem with the focus between windows, take a look at this post.
    http://forums.ni.com/t5/LabWindows-CVI/Focus-between-two-applications/m-p/1016762

  • Need Help for AIR Email Application

    Hi,
    I’m a beginner to Adobe AIR.
    My new assignment is to create an AIR Application which works like MS Outlook with minimal features like compose mail, inbox, send items and contact details.
    With the help of some server side script (like PHP, CF) I can make it work. But My TL asked me to communicate directly with mail server through AIR.
    I googled for a week for some tutorial to help me, But I can’t find anything useful.
    Is there any way to communicate directly with web server and list the Inbox, Outbox, and Contact details…? If so, please help me to find the solution…
    Thanks In Advance

    Hi,
    You can use LaunchExecutableEx to determine the window state:
    LaunchExecutableEx ("command.com /C calc.exe", LE_HIDE, NULL);
    Beware that this function does not wait for the started executable to exit.
    It executes the command in the string and continues.
    If your application has to get the results of the call, then you need to get the application handle  (3rd parameter, put a variable instead of the NULL above) and call ExecutableHasTerminated in a loop to find out if the execution finished.
    Read carefully the help for the LaunchExecutableEx function and Handle parameter.
    To get the result of the command line call, you can add a "> output.txt" parameter to the end of your command line call.
    This way all the text output of the command is written to the output.txt file, from which you can read the result.
    Check the command-line email sender program's help if there is a special paramter to make it more "verbose".
    Hope this helps, 
    S. Eren BALCI
    www.aselsan.com.tr

  • Need Help for Sending Email with LabWindows 8.5 or 9

    Hi,
    I'm trying to send an email with attach excel files to it using InetSendMail function and outlook activeX and always having no success on it.
    I am still a student so i dont have much time for researching these functions, so im asking for an example working code for this problem.
    Thanks for your the help in advance...
    I've also tried changing the examples from the package
    Solved!
    Go to Solution.

    Hi,
    You can use LaunchExecutableEx to determine the window state:
    LaunchExecutableEx ("command.com /C calc.exe", LE_HIDE, NULL);
    Beware that this function does not wait for the started executable to exit.
    It executes the command in the string and continues.
    If your application has to get the results of the call, then you need to get the application handle  (3rd parameter, put a variable instead of the NULL above) and call ExecutableHasTerminated in a loop to find out if the execution finished.
    Read carefully the help for the LaunchExecutableEx function and Handle parameter.
    To get the result of the command line call, you can add a "> output.txt" parameter to the end of your command line call.
    This way all the text output of the command is written to the output.txt file, from which you can read the result.
    Check the command-line email sender program's help if there is a special paramter to make it more "verbose".
    Hope this helps, 
    S. Eren BALCI
    www.aselsan.com.tr

  • LaunchExecutableEx() with editable bat commands

    Hi, CVI veterans,
    I succeed reading back firmware and EEPROM from a uc with a bat of below code.
    int status;
    char fw_pro_cmd[300]="D:\\data\\read_uc.bat"; 
    SetWaitCursor(1); 
    status=LaunchExecutableEx(fw_pro_cmd,LE_HIDE,&cmd_handle);   
    Delay(8); // 8 second is to make sure the cmd is executed surely.
    RetireExecutableHandle(cmd_handle);
    SetWaitCursor(0);
    The content of read_uc.bat is
    cd d:\Data\
    pk2cmd.exe /PPIC18F2320 /GFD:\1.hex >>d:\1.txt
    ===============================
    /GFD:\1.hex means to save the content to D:\1.hex.
    I’d like to the hex destination is changeable easier in my next version, instead of fixing it in the bat file. e.g., user can set hex name or full path from user interface.
    One approach is to modify the bat file with CVI before using LaunchExecutableEx() , but I don’t prefer it.
    Is there a beeter way? Please advise.
    Thanks.
    Solved!
    Go to Solution.

    Hi labc, a simple google search returned this page which I consider exhaustive on DOS batch files.
    There is nothing different on their usage in CVI: you must simply accomodate in a proper way the string to pass to LaunchExecutable.
    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?

  • MAX command line parameters

    I could program a whole panel to allow the user to modify the setup parameters for a DAQmx task, but decided that it's easer to simply stop the task and launch MAX with LaunchExecutableEx and let the user play with the task settings there. Is there any way to tell MAX, e.g. through command line parameters, to open up and display a particular DAQmx task upon startup?
    Solved!
    Go to Solution.

    Helo pblase,
    I do not believe that it is possible to configure MAX to open up on a particular task. It also appears that there is no MAX ActiveX Automation Server that we can access.
    Jacob R. | Applications Engineer | National Instruments

  • Logical command in ABAP.....Urgent

    Hi,
      i am pretty new using ABAP program so i neeed help urgently. i am trying to move a file on the application server from one directory to the other and i was using the open dataset function to do that. but the file i am trying to move is pretty big and because i am using internal table to store, it is causing problems with the space.
      i have consulted the basis guys and they have managed to create a logical file for copying from one directory to the other on the application server. to help you furthter. i am enclosing the mail sent to me.
    I have created a logical command which should copy the file from one location to the other but you need to pass it the source dir and file name and the destination dir and file name.
    The logical command is ZCOPY and uses cmd /c copy
    Copies one or more files to another location.
    COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
         [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
      source       Specifies the file or files to be copied.
      /A           Indicates an ASCII text file.
      /B           Indicates a binary file.
      destination  Specifies the directory and/or filename for the new file(s).
      /V           Verifies that new files are written correctly.
      /N           Uses short filename, if available, when copying a file with a
                   non-8dot3 name.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless COPY command is being executed from
    within a batch script.
    the problem now is i have no idea about how to use the logical command. can any one help me.
    Thank you,
    Ravi.

    If memory is not an issue, then there should be no reason why this should not work.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: itab type table of string with header line.
    start-of-selection.
    * Read old file
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into itab.
          if sy-subrc <> 0.
            exit.
          endif.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Write to new file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete the old file
      delete dataset d1.
    Regards,
    Rich Heilman

  • Shell commands in applescript noob

    Hi all this is my first post in these forums and I come seeking help with a certain script I'm writing for my current college job. The purpose of the script is to install creative cloud from a server and this is as far as I've got. First I can get as far as setting the correct directory in the server by doing:
    do script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build"
    now when I press run the terminal screen pops up just fine with no errors in the right directory. However I've been reading up that to do other commands in the same shell I must do do shell script. When doing this however terminal doesn't do...anything. The reason why I was trying this is because my next command would be initiating the install which is the command:
    "installer -verbose -pkg 'enterprise_Install.pkg' -target /" with adminitrator privilages
    Now my question is how would formulate this within applescript? Thanks.

    do shell script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build ;  installer -verbose -pkg 'enterprise_Install.pkg' -target / with administrator privilages"
    You got the double quote in the wrong place.
    do shell script "cd /Volumes/applications/Mac/'Adobe Creative Cloud'/'Enterprise - enduser'/Build ;  installer -verbose -pkg 'enterprise_Install.pkg' -target / " with administrator privilages
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set unixDesktopPath to POSIX path of "/System/Library/User Template/"
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "sudo ls -l  " & quotedUnixDesktopPath with administrator privileges
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Issue to write/execute AT-commands for a 3G modem

    Dear community,
    For the past month, I'm searching for some help on this topic without success, "you are my last hope"
    After modification of the PPP parameters under network preferences (according the clear archive from apple support on this topic), the terminal windows is poping up without any problem.
    Then... I can't write anything on this terminal !!! The only actions I'm able to perform is cancel or continue button. I also press the Return key as apple support mentioned (issue for 10.2 or earlier), nothing.
    The test was done on a early 2010 macbook 13 and the same on a mid 2010 macbook 15, the same issue.
    - Am I doing something wrong or mac os restricted this com protocol?
    - Is there a way to command the modem trough the main computer terminal (which is working properly)?
    Thank you in advance!

    You've probably solved this problem long ago, but I came across this thread a couple weeks ago when trying to do the same and thought I post this .vi for future users.  This code is for a multitech MT5656ZDXV modem, but I think the AT commands are generic enough to be used with any voice modem. Hardware configuration requires and audio cable running from the PC speaker to the modem mic port.  Also, I had to use a Konnex Office Konnector telephone line A/D which required me to manually pick up a handset; the software prompts the user to do this.  Fancier A/Ds should eliminate the need for this and I have one on order.  If you have an analog phone line then there should be no need to use an A/D or manually pick up the phone.
    Attachments:
    modem_speakerphone.vi ‏21 KB
    Sound Player.vi ‏17 KB

  • Manage-bde command is not generating recovery key on network location

    Hi,
    I am trying to save the recovery key to the network share location and start up key in the USB drive while enabling bit locker.When the OS drive gets encrypted, the default folder for recovery password shows that it contains 1 file but not getting anything
    inside it when i checked the properties of the folder.
    i have already changed the group policy as "choose default folder for recovery password".
    I am using the command to enable the bit-locker as "manage-bde.exe -on C: -rk
    <network location to save recovery key> -sk <location of the USB drive>
    -rp to enable the bit-locker. It is generating the start up key in the USB but not the recovery key on network share.
    Can anyone suggest what i am missing or what else i should do to generate the recovery key on network share.
    Does manage-bde process be able to save the recovery key on network share or it hand over to some other process to perform this task.
    Thanks
    Gaurav Ranjan

    I got you Manoj, but I want to ask you one think that what if i lost the startup  key or my USB stick. I have my recovery key on the network share.  In order to log-in my machine I need the recovery password. From where i will get the recovery
    password(48 digit). Surely from the recovery key on the network share. So how can i get the recovery password if only we have the recovery key.
    I know both are different in context. Both are two different thing. I have lost my USB stick along with the recovery password and I have to log-in my machine. How can i do that i want to know that. Do there is any method to get recovery password from the
    recovery key on network share. I have retrieved the recovery password when the recovery key in AD. But this time it is on network share.
    Also one think which I need to solve is that the manage-bde -protectors -add command creates a new .bek file along with the older one. So the .bek file which get shown at the time of the start up of the machine is different from that stored in the network.
    So i am getting confused as which .bek file is for which machine and hard to retrieve the password.
    Is there any method to store recovery key on network without the -protectors -add command line so that both the .bek file should be matched and can easily be known for indiviual machine in an OU. As if both the .bek files will be different it would be difficult
    to to retrieve the recovery password for the machines.
    Please do inform if you need some more information about the scenario if i missed something.
    Thanks
    Gaurav Ranjan

  • Open and Close a command line exec via OpenG.lib in seperate VIs

    Hi,
    I'm aiming to perform tests on my UUT - over a command line based executable which established a USB connection, so - sendings commands and checking the return string. 
    So far i'm reusing the pipeNight.vi which is shared in the following post.
    http://forums.ni.com/t5/LabVIEW/How-to-pass-input-to-a-DOS-executable-that-is-running-in/m-p/1763182...
    However i wish expand from LabVIEW and utilise NI-TestStand sequence files to ramp up the test coverage and perform the tests automatically.
    The issue i've encountered - every time i call the pipeNight.vi from a TestStand sequence Step, the USB connection is build up and torn down.
    Although i'm not encountering any performance issues to date, i would ultimately like to open a session (i.e.establish the usb connection) - at the beginning of a sequence file, send a bunch or commands and check return strings, before closing the session at the end of the sequence file. This is surely a more effecient and elegant solution.
    Is it somehow possible to split the pipeNight.vi into several VIs to realise this objective?
    - Open 
    - Write/Read
    - Close
    i'd appreciate and help or alternatice solutions on this!
    B.Regards
    Kech
    Solved!
    Go to Solution.

    I had tried to explain in my initial post, that if i call the pipeNight.vi from a TestStand sequence file step, then establishes a USB connection and tears it done - for every command that i send/ respectively every sequence step that i run in TestStand. As i envisage multiple (several hundred) test steps, i woul like to improve effeciency by establishing the ESB connection once instead of multiple times.

  • How to issue print command from report/form server to client printer on web

    1) We have a client server application which is to be deployed on the web environment. The reports generated in our application are having a destination type as File. These reports are printed after applying some print format (escape sequences) which are passed on to the printer programmatically at runtime while printing.
    Now when this application is shifted on to the Application server (Forms server & Reports Server )in web environment ,the report outputs would be generated in the application server as against the client in client server environment as the report server is on the application server.
    Now while printing/accessing the report the output file will not be available to the client unless it is pushed on to the client side from the server . I am able to see reports in pdf/html output but in this case layout of my reports gets changed and I dont want to change my layouts or reformat my report layouts.
    How do I redirect the report output from the application server on to the client within the D2k context and then execute print commands?
    Note: In this case we want to use both DMT and Laser printing. Also note that we use escape sequences to adjust reports in desired printing papers.
    2) We have second set of reports which we call as document because these are printed after capturing data from 'Form' using text_io utility (please note that for these documents we are not using any Report 6i functionality)and we print it from file using printing mechanism as mentioned above. These are working well in client server application. We adopted this methodology for getting better performance (in terms of speed as database server and network traffic is not involved) of printing. But now we are converting our application for web, we are finding it difficult how to capture Form's data from browser to client's machine and then executing printing commands which are stored in our application liabrary.
    If you help me out by giving some suggestions, I shall be grateful to you.
    null

    Hello
    I wonder if you ever solved this problem.
    I have a very similar problem with Photoshop CS5 on Mac OSX 10.6 + HP Photosmart C7180.
    If I choose "Photoshop Manages Colors" the results are lousy.
    If I choose "Printer Manages Colors" the results are OK. not necessarily great.
    I believe I have all the correct settings after going through books and web advice (and wasted a lot of paper and ink).
    As far as I can see, "ColorSync" is the internal Mac management which is the only option available with "Photoshop Manages Colors" and "Vendor Matching" appears to mean the printer vendor (ie HP) will provide the matching. Either can be selected if "Printer Manages Colors" is used. It seems the type of paper can be set in three different places. if That's all a bit academic as the results are poor regardless.
    My wife suggests I buy a new printer - Epson's looking good.
    Any words of wisdom would be appreciated.

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • How do I add a close command to multiscreen layouts?

    I need to add a close command multiscreen HTML5 screen layouts that will work on multiple platforms and browsers. I have 3 screen layouts defined: Desktop, Tablet, Mobile. These are called by a responsive design web application and display based on the screen width of the platform calling the help. My problem is that there is a requirement to be able to close the help. To do this I have added the javascript code:
    </a>
           <a href="javascript:window.close()" class="wPrintButton"><img
           src="Close.png" alt="" class="wPrintButton" border="0" />
    in each of the layouts to allow the user to close the help browser tab/window.
    My Desktop layout is based on the stock desktop. I added this command Topic.slp and SearchResults.slp d just to the right of the Print icon.
    My Mobile lay out is based on the stock iPhone. I added this as an additional row in the homepage links to the Home.slp.
    My Tablet layout is based on the stock iPad. Again I added this as an additional item to the homepage links to the Home.slp.
    My problem is - it appears that the window.close() javascript will not work with iOS. Has anyone incountered a similar problem and how did you deal with it?

    I had another idea that I am pursuing. I am looking into extending the current renderer CommandNavigationRenderer and will render another goLink just after the current goLink that will execute a close action. I was able to re-direct the rendering by added an override render-kit block in my current faces-config.xml file.
    <render-kit>
    <renderer>
    <component-family>org.apache.myfaces.trinidad.Command</component-family>
    <renderer-type>oracle.adf.rich.NavigationItem</renderer-type>
    <renderer-class>com.riscs.ui.backing.jsp.components.ClosableCommandNavigationItemRenderer</renderer-class>
    </renderer>
    </render-kit>
    If this works I am planning on extending the commandNavigationItem by creating a ClosableCommandNavigation tag and add a "closeAction" tag that will determine if a close item should render.
    Preliminary work looks promising. I will update if I make progress...please let me know if I am crazy.
    Thanks.

  • At a helper's suggestion, I hit Command+up arrow + 4. Ouch. Can't undo resulting view

    I was working with a support person at Constant Connect, and to solve a problem I was having, she suggested I hit Command+4+up arrow. I did. All the text in the article I was viewing became tiny, tiny. I now can't get out of this setting.

    Hi, Tim...
    Command + 0 didn't solve my problem. But Option + 0 did. (Us Mac people have to be different, huh?)
    Thanks so much for getting me onto the right road!
    Deb

Maybe you are looking for

  • AED for domestic purchase

    Hi, Is it possible to take 100 % credit of AED in the same year in case of a domestic purchase of a capital item.If possible what settings needs to be done. Now system is only allowing to take 50% in the current year and the remaining 50% is posted t

  • Error while Backup

    Hi Experts, When i try to take backup via. i'm getting this error :( . Pls Help C:\oracle\product\10.2.0\db_3\BIN>rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Fri Nov 9 22:30:33 2012 Copyright (c) 1982, 2005, Oracle.  All rights

  • Milestone Error when changing the status of service request.

    Hi Expert. I got an issue where service request is displayed with an error "Item 10: Start and end dates must be identical for a milestone date". I took around 200 service requests and observed that in the change history, the response profile of the

  • Ipod touch stuck on apple logo screen and empty loading bar

    This is what happened. I got a friend who knows how to download games in my ipod touch.  But as it turned out He broke it He cant restore it. I tried DFU mode the restoring. and even Redsnow! its just stuck on a Apple logo and an empty loading bar un

  • My ipod has an odd screen and won't do anything, I've tried restoring it but nothing has worked. What can I do?

    So my Ipod classic starting acting oddly when I docked it recently. I took it off my docking station, which I'd used many times before and have no issues with, and the symbol for "docked" was still hovering over the battery. I didn't think anything o