LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set windows permissions for folder

My labview app is being installed to the prog files dir for the app by an installer created by the LV Dev System.  i encounter a problem when trying to store a config file for the app to the directory during user customization of settings after app installation because the file I am trying to update is read only due to win 7 defaults.  I try to set the permissions for the folder programmatically, but it does not change the folder to a NOT read only one.  What is the trick here?  Do I need to put my config files in another directory somewhere or is ther a way to change the folder settings so I can create temp files in that folder?

0 Kudos
Message 1 of 6
(5,276 Views)

Hi,

 

You need to not double click on the application to open, but right click on the program that it opens up in, and click "Run as Administrator"

 

Using windows 7 .standard users do not have write access to Program Files or any of its subfolders.

0 Kudos
Message 2 of 6
(5,268 Views)

Hi,

 

the trick is to use the officially recommended %UserAppData% folder to save custom (config) files.

You should not fiddle with permission settings...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(5,266 Views)

Creating temporary config files in Program Files is not very good practice. I would do it in the public user folder.

 

How are you setting the parameters?

 

Did you use the following?

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/set_permissions/

 

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/setting_permissions/

Excerpt from the link above:

You can use permissions to change only write permissions for users (bit 7); the operating system ignores all other changes to the bits.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 6
(5,260 Views)

Hi,

 

I think is much easier to use unlock attribute to unlock a folder (set in installer build specification -> Source File Settings -> File and Folder attributes)

This works fine using LabVIEW 2011

0 Kudos
Message 5 of 6
(5,256 Views)

 

 

Unlock—Place a checkmark in the checkbox to unlock the selected file or folder. You cannot use the Unlock option for predefined destination folders in the Destination View tree, including absolute paths. When you unlock a file or folder, you remove administrator access requirements from deployed files and folders, which allows anyone to edit files and folders after they have been installed.

 

Source File Settings Page (Installer Properties Dialog Box)

0 Kudos
Message 6 of 6
(5,251 Views)