LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a path for distribution kid

Solved!
Go to solution
Hello,

I have created a application and now I want to build a distribution kid. Here I got a problem. My application needs a *.txt data to run. In my development code I save the data in the same folder as my *.uir and the *.c files (as example: fopen("Test.txt", "w");)So now is my question how can I say in my program that it should create the *.txt file in the same folder where my program gets installed over the distribution kid?
My first idea would be to call the whole path where the program gets installed (C:\Program\MyApplication\Test.txt).
But here I don't know where the program gets exactly installed on another computer. Is there a way to find that out?

Best regards
0 Kudos
Message 1 of 2
(2,949 Views)
Solution
Accepted by topic author Fasching_K

You want GetProjectDir() from the utility library.

 

However, beware that your app may not have write access there. If you need to write data to a file from your app, see here.

0 Kudos
Message 2 of 2
(2,913 Views)