LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a file not read only? Using LV6.0, I have tried the Access Rights VI w/o luck.

I am talking about any file in windows 98 that has the read only box checked when I look at the properties of the file from Windows Explorer. I can can get rid of the check from the properties box, but I want to do it programmaticaly in LabView.
0 Kudos
Message 1 of 3
(2,696 Views)
________________________



Hi,

Wire in '448' to the 'New Permissions' of the Access Rights VI. This will set the file as readable, writable and executable. I just tried this (on WinNT, though).

The 'permissions' parameter is a 16-bit integer where the least 9 bits are used. Of these, for Windows, bits 8, 9, and 10 (0-indexed) are important (i.e. if these are set = integer 448). See online Help for full details.

Hope this helps,

Khalid 🙂



___________________________
Message 2 of 3
(2,696 Views)
You have the right function, maybe you aren't using it correctly? If you set new permissions to 128 (bit 7=1)it should unlock the file, setting it to 0 will make it read only again. Those are the only values that will make this function do anything in the Windows enviroment.
Message 3 of 3
(2,696 Views)