LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running an EXE from LABVIEW without the 'cmd' window showing

Hi,

I am currently using the 'system exec.vi' in a LabVIEW application to open files in external executables (mainly Windows Explorer, Acrobat Reader and Word).  This actually works fine and while my application is fairly sleek (even if I do say so myself) I am annoyed by the cmd window that momentarily appears each time I use the 'system exec.vi'.

Is there any way to disable this window?  Or maybe there is another way of opening the files altogether?

I am using LabVIEW 8.0 on Windows XP Pro.

Any help would be appreciated.

Bazza
0 Kudos
Message 1 of 6
(3,322 Views)
If run minimized? is TRUE, the VI minimizes the run of your executable program.
The default is FALSE. run minimized?
Does this help you?
Karthik SP
0 Kudos
Message 2 of 6
(3,313 Views)
It actually minimises the execution that it starts (i.e. Word or Acroread), but the cmd window still pops up briefly....

Thanks though...

Bazza
0 Kudos
Message 3 of 6
(3,293 Views)
Hi Bazza,

Do you only want to open PDF and DOC files in Acrobat and Word?
If so, then both these programs have an ActiveX interface, you can open a reference to the programs and use the open/load methods provided in the interface to call the documents you need opened.

We already have a toolkit that talks with MS Word and Excel it is the LabVIEW Report Generation toolkit for Microsoft Office. If you bought LabVIEW in a developer suite you already have this toolkit on the LabVIEW toolkit CD.

As it seems you are only opening a document, this toolkit would not be good value for money as it allows you to create entire Word and Excel documents with font sizing/styles, Report layout, appearance, Chart creation, printing, e-mailing and so on.
If you only want to open a document I suggest you look at the example finder and search for "XL" this will give you a example of ActiveX programming.

Regarding Explorer, what are you trying to do with explorer that requires you to run a CMD window?

Regards
JamesC
NIUK and Ireland

Message 4 of 6
(3,263 Views)
Thankyou for your comments...

I do buy LV as part of a developer suite so could use the toolkit you mentioned.  While PDF's and Word docs are the main files I open they are not the only.  I guess I could open different file types different ways.  I just hoped there was a better all round way to do it.

As far as Windows Explorer goes...  My application is a file manager targetted directly at the file structures we use for developing functional test applications.  The application handles all the file management requirements (i.e. WIP Backups, deploying, zipping/archiving etc) and its an added feature that you can 'explore' a given folder directly from the application.  The general idea is that all our developers create systems using the same structure and approach.

Cheers,

Bazza
0 Kudos
Message 5 of 6
(3,218 Views)


@Bazza wrote:
Thankyou for your comments...

I do buy LV as part of a developer suite so could use the toolkit you mentioned.  While PDF's and Word docs are the main files I open they are not the only.  I guess I could open different file types different ways.  I just hoped there was a better all round way to do it.

As far as Windows Explorer goes...  My application is a file manager targetted directly at the file structures we use for developing functional test applications.  The application handles all the file management requirements (i.e. WIP Backups, deploying, zipping/archiving etc) and its an added feature that you can 'explore' a given folder directly from the application.  The general idea is that all our developers create systems using the same structure and approach.

Cheers,

Bazza


Have you looked at the VI in vi.lib\Platform\browser.llb\Open a Document on Disk.vi. It opens the document passed in according to its file ending and attempts to communicate with the target application through DDE if possible before using the command line. Even then I have not seen a cmd window popup so far.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(3,209 Views)