From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find Application Folder on Labview

Solved!
Go to solution

Hi

 

Is there any way to find dynamically the "Application Folder" on LabVIEW?

 

For example, if i have windows on another language, the application folder won't be the typical:

C:\Documents and Settings\All Users\Application Data\

 

I already tried to use the property node "App.Default Application"  but i can't use this do get a path.

 

Thanks

0 Kudos
Message 1 of 5
(5,030 Views)

Does the path constant "Default Data Directory" work for your needs?

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 5
(5,026 Views)

Hi

The path constant "Default Data Directory" does not work sorry:(

 

Default Data Directory:

C:\Documents and Settings\user\My Documents\LabVIEW Data

 

I guess there is no LabVIEW funtion the Application Folder dinamically. Perhaps only if i implemented...

Well, thanks anyway:)

0 Kudos
Message 3 of 5
(5,018 Views)

Hello.

 

You can have your application path like this:

 

 

regards.

Message Edité par mehdi.afif le 04-01-2009 08:38 AM
Message 4 of 5
(4,985 Views)
Solution
Accepted by topic author JPLO

That only returns the folder where the VI is located, not the Windows User "Application Data" folder, which is a "special" folder.

 

To get the "Application Folder" you can user either .NET or the Windows API. For .NET you can use the Environment.GetFolderPath method. For the Windows API you can use SHGetFolderPath

 

Here's the .NET method:

Download All
Message 5 of 5
(4,976 Views)