01-06-2012 07:09 AM
I am getting an Error 8, incorrect permissions to access file. This occurs when I run an installed executable under Program Files. If I run my application as an administrator, I don't get this error. Specifically, I am trying to open a file that's in the \data directory under the application folder. Is there a way to change the permissions of a destination folder in the build specifications?
01-06-2012 07:50 AM
Is this under Windows 7? If so, that's an operating system limitation. Windows 7 does not allow you (for good reason) to mess around in the program's application directory. You should be writing to the Program Data folder instead. LabVIEW has file constants that you can use to get specific directories rather than hard-coding them (if that's what you're doing).
01-06-2012 08:09 AM
Thanks, that is definitely what's going on. When I use the default data VI in LV2009, it uses a data folder under Documents. Is there a way for this to point to the actual "C:\Program Data\" folder on Win7, but point elsewhere on previous versions?
01-06-2012 09:13 AM
Use the Get System Directory VI (in the File Constants palette). The value "Public Application Data" should return "C:\Program Data".
01-09-2012 11:47 AM
You can use the Application property node to determine which OS you are running. To access this property node follow these steps:
Bring up your diagram and right click to get the vi palette.
1. In your functions palette go to Programming>>Applicaion Control>>Property node. Drag a property node into your block diagram.
2. Select the following properties OperatingSystem>>Name and OperatingSystem>>Version
Windows 7 will show up as Name: "Windows NT" and Version: "6.1".
04-11-2012 04:19 AM
Go into the installer properties -> source file settings -> 'your folder' and set the 'unlock flag'!
RTFM: "..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." 😄
02-26-2014 06:26 AM
Thank you for reply,.... its working...