LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the installation path of the installed LabVIEW applications

Hello All

The LabVIEW application "aplication.exe" has been installed in user-defined directory.

I would like to detect the installation path of the "applcation.exe" from other vi. Is there any LabVIEW native way to do it? Maybe some registry record for this application, or maybe finally some windows way to find it.

Thanks in advance
Pawel
0 Kudos
Message 1 of 8
(7,597 Views)
You can use the "VI Library" VI to give you the path to vi.lib. Then you can strip the path once and there is the directory.

Another way is to use the Application Property Directory Path. However be careful with this, if you are compiling your code into an exe, you will get that path.

Evan
Message 2 of 8
(7,597 Views)
Hi Evan

It looks like I did not explain it clearly what I want to do. I want to find the installation path of the LV application. I have aplication already installed in the system. This is an .exe file. I want to find in which directory it is installed. I need to obtain this information programatically, probably by reading some registry key, but I do not know which.

regards
Pawel
0 Kudos
Message 3 of 8
(7,597 Views)
If you use the application class "directory path" property it will return the path of the compiled exe no matter where you move it.

So all you need to do is drop a property node that will default to the application class. Then select Application->Directory Path and when you build the executable it will return the path you are looking for.
0 Kudos
Message 4 of 8
(7,597 Views)
I re-read this thread and I think I misunderstood. Do you want to find the path of an exe from a totally seperate VI. If so you may be able to use the application class properties if the exe is running, and is configured to allow VI server access.

If not then I think you are correct; you will need to search the registry and as far as I can tell that is not an easy thing to do. I did find some useful code that takes the Product code that is generated with the application builder and converts it over to the registry codes. I have attached that.

Unfortuently that gives you the installer information, however it does not appear to have the destination path. A seperate key under \Software\Microsoft\Windows\CurrentVersion\Installer\
UserData\S-1-5-18\Components has that key. But I have not figured out how to create the key needed there. I just searched for the above code inside that tree.
0 Kudos
Message 5 of 8
(7,597 Views)
Hi Evan

You are right, I need to search the registry for those information, since it is the exe file which I need path to serch for.

I got some useful information from others on how to prepare your own registry key. I think this is the best way to go.

Thanks
regards
Pawel
0 Kudos
Message 6 of 8
(7,597 Views)
hi,

how about letting your app.exe write its path at startup to a file on a distinct location and your other app reads that file and removes it afterwards? ok, you have to execute the app.exe to get the latest path. if both apps use the same runtime engine you could use the "temp dir" or "default data dir" path-constants for that file.

best regards
chris
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 7 of 8
(7,597 Views)
Hi Chris

thanks for the idea, but I will go for registry, I guess.

regards
Pawel
0 Kudos
Message 8 of 8
(7,597 Views)