LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save data into csv from the installer of VI

Hi everyone

 

I created a VI with a save function of the output graph from a sensor. When I run the VI everything works perfectly, even I also created an executable file from it and it works perfectly too. The problem occurs when I created an installation file based on the earlier made executable file. I use an "Application Directory" as the base path input, which as I know it will save the data to where the VI file is located. Even in the exec file, it also works that the file is saved in the exec file folder, not in my original VI folder. But it's not working when I run the exec file from the installation process. Is it because the exec file is located in C drive so it cannot write a new file into the directory as it's not an admin? Or are there any other reasons? Thank you

 

 image.png

0 Kudos
Message 1 of 4
(1,552 Views)

Hi keyvdir,

 


@keyvdir wrote:

But it's not working when I run the exec file from the installation process. Is it because the exec file is located in C drive so it cannot write a new file into the directory as it's not an admin?


Most probably your assumption is correct!

Simple solution: don't use the "AppDir" to create the path for saving data!

 

This is not a LabVIEW question, but a MS Windows question: Microsoft recommends to use other folders to save data (since several Windows versions)!

One possible folder is the UserAppData folder ( type %localappdata% into the Explorer path input), which is guaranteed to allow write access to executables running at default user level rights. LabVIEW also has a function to find that path in the Path constants function palette named GetSystemDirectory…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,524 Views)

Hi Gerd,

 

Thank you for your reply. Hmm, I see, okay I will try to change the AppDir with the GetSystemDirrectory palette. I will update the status again later.

 

 

Best regards,

 

Kevin

0 Kudos
Message 3 of 4
(1,515 Views)

I always save data to the Public Documents folder exactly for this reason.  And I specifically choose Public Documents so that any user of the computer can access the data.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(1,495 Views)