LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Associate File Type With Application

I am asking this question because just within these forums, I have seen two different ways to do this, and am not sure what is the correct or best way to do this.

 

this CVI forum page

and this page which was linked from another forum page

 

I've done it with other programs by doing the following (second link):

[HKEY_CLASSES_ROOT]

Adding key for extenstion - .myext ; value = MYEXTAPP

Adding key for App - MYEXTAPP;

   then adding a shell -> open -> command %destMYEXTAPP.exe %%1

   and adding a DefaultIcon key under shell pointing to %destMYEXTAPP.exe, 0

 

This works, woohoo Although I am not sure if it save it another program came along or already existed for this extenstion.  This is how the second link suggests it.

 

But the first link suggests a different way.

 

in addition, it seems the majority of the extensions in classes root and software use Persistent Handlers?! and am wondering how those work.  I've read through some of the MSDN forums, and not sure if this would be overkill, and they seem to reference dll's as opposed to exe's

 

So just wondering if anyone has experience doing this with some insight.  I think the goal would be to safely create an extension for my app and if there are duplicates, perhaps it just shows up in the openwith window.

 

Thanks

 

0 Kudos
Message 1 of 2
(2,801 Views)

It looks like both approaches are similar and will both work.

 

Persistent Handlers are probably overkill. They will do what you need and more, but are a more complicated. I would recommend sticking with the two approaches discussed if you simply want to run your application with a default program.

 

Although some CVI users may have done this in the past, you may have more luck posting on the MSDN forums or a 3rd party programming forum.

National Instruments
0 Kudos
Message 2 of 2
(2,757 Views)