07-13-2020 12:10 AM
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
07-13-2020 01:29 AM - edited 07-13-2020 01:31 AM
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…
07-13-2020 02:58 AM
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
07-13-2020 05:17 AM - edited 07-13-2020 05:18 AM
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.
