LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a LabVIEW application as default program for opening files

Solved!
Go to solution

Google has returned nothing useful on this.  I want to use a built LabVIEW application to open data files from the Windows desktop. It is easy to edit the Windows registry to set the application as default program - but I'm not sure how to set the event in LabVIEW to open the file.  Any suggested reading?

0 Kudos
Message 1 of 3
(2,811 Views)
Solution
Accepted by topic author BowenM

See this - http://labviewwiki.org/Associate_your_own_file_type_with_Windows_Explorer

 

I seem to remember that people said that it stopped working and that there was some workaround, so you might need to do some more digging on that event.


___________________
Try to take over the world!
Message 2 of 3
(2,806 Views)

I have done this before...I have a small LabVIEW .exe which looks at the version of a VI and selects the appropriate version of LabVIEW to open it with if available. It also adds explorer context menu items for allowing you pick a specific version of LabVIEW to open the file with.

 

This is a rough idea of the registry keys for adding a program to handle specific file types and to add items to the shell menu in the installer:

2014-11-20_17-00-05.png

 

Add your own 'LabVIEWOpenWithVersion' key and then add the key name to the OpenWithProgids for the file extensions you want to be able to open with your application. The command part looks like this:

2014-11-20_17-06-02.png

 

Look at the Windows/MSDN help for what the different keys mean and how they are used, I think you can also set a key to make one of your handlers (e.g. Open, openWithLV) the default for the file type.

 

For getting the file that was opened 'with' your application, use the App.Args property, ignoring the first item (which is always LabVIEW) in the array.

2014-11-20_17-03-18.png


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 3
(2,787 Views)