LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to find an exe file to run it from labview

sorry, that previous message should have read I am NOT experienced in working with the registry.........................(or typing either it would appear)
0 Kudos
Message 11 of 16
(960 Views)

When a program is installed information as to its installation path is (usually) written to the registry. One place that you can find this information is in the HKLM/Software hierarchy. When your program gets installed a new key (folder) should be created in that tree. Sometimes you'll find a "Path" key within this subtree. Sometimes the path is stored in the "Default" key for that subtree. The only way to tell is to actually look.

 

Another location where this information can be found is in the HKCR\Applications hierarchy. Each application has its own subtree. There you will have a shell\open\command and the "Default" value will provide the full path to the application. Attached is a screenshot of what my registry looks like for, say, Firefox. If I wanted to read this registry value in LabVIEW I would do this:

Message Edited by smercurio_fc on 09-01-2008 02:58 PM
Download All
0 Kudos
Message 12 of 16
(942 Views)

Hi there

 

if i'd be the user it would be OK for me to manually supply the path to the desired application, e.g. by a file dialog (i do similar things each time i configure e.g. web browsers, mail clients, IDEs etc..). If the LV app stores the path in a file it would ask me only once.

 

just in case the folder of the app is in the systems search path you do not have to supply the full path of the app to run it.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 13 of 16
(933 Views)

There's on more location in the registry where you could look:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\<Appname>. If the application is listed there you'll find the path in the default key.

 

0 Kudos
Message 14 of 16
(929 Views)

Hi Dylan,

 

What everyone is saying would seem to be the way to go either:

 

1) Read the location from the registry if it creates a registry key on installation.

 

2) If not then creating a one off prompt where they select the location of the executable and then save this information to a configuration file.  You could perhaps automatically set the expected location (presumably c:\Program Files ...) and if it isnt found there then prompt the user.

 

Regards,

James Mc
========
Ask me about Rust & NI Hardware
My writings are at https://www.wiresmithtech.com/devs/
0 Kudos
Message 15 of 16
(901 Views)

Thanks to you all for your help,  I have searched the registry carefully, but I do not think the program does create an entry there which means I cannot find it there.  I think the best option is to look initially in its expected location and if not found open a dialogue box for the user to locate the software.  Thanks again for your help.

 

 

0 Kudos
Message 16 of 16
(897 Views)