Jump to content

Launch an exe which is 'always included' within another exe


shred444

Recommended Posts

I have exe1, and I'd like to launch another exe2 which is always included during the build process.

post-12653-0-45314700-1382447949.png

In other words, the path of the exe2 should be something like Main.exe1/subapp.exe2. Or at least this is the path of an 'always included' vi.

By using the system exec call, can I call this included exe directly? Is there a better way to launch exe2 from within exe1?

Edited by shred444
Link to comment

When you select a file to be "Always Include" which isn't a LabVIEW file, it doesn't put it in the EXE.  Go to the Destinations category and you'll likely see two things, your EXE and the "Support Directory" this is the location where files that don't go into the EXE will be when the build is done.  So if I include a JPG file as Always Include it will go in the folder specified by the Support Directory.  This is usually something like <folder where EXE exists>Support or data in older versions of LabVIEW.

 

So what this all means is you can call "Motor Monitor.exe" from your top level EXE, but you will need to know the path relative to the main EXE which is defined by that Support Directory settings.  You can also click the Preview category and choose Generate Preview to get an idea of the file structure that will exist after the build is made and it should show you where the Motor Monitor EXE will be.

  • Like 1
Link to comment
  • 5 weeks later...

I had a project where I wanted to distribute a second EXE for a small update function with my main application and I needed to be sure the second EXE was compatible with the first. I handled this by compiling the second EXE and then importing the EXE as binary text and storing in a string control. When I needed the external EXE to run, I wrote it our to disk and then called it. The second EXE was very small and not run so often and so this was an OK but maybe crazy solution.

 

This works but is not without problems (i.e. if the second EXE needed to be updated, I had to resample the EXE and then recompile the first application). I don't really recommend this as a solution, it really depends what you are trying to do.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.