LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to turn off UAC or set file write permission from LabVIEW in Windows 7

Hi all,

 

I have a LabVIEW 2009 program working in Windows XP. In this program I use the File Set Permissions VI to set write permission using the number 128 & then write some data to it. Now the same program in Windows 7 gives out an error 8 saying that I do not have the required permission for the file write. I understand that the Windows 7 has UAC. Also running my application as an administrator is not an option. So is there a way to bypass/disable UAC from LabVIEW programmatically so that I could grant write permission to the required files from my program?

Any help would be greatly appreciated.

 

Thanks,

Priyadarsini S

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

Your question is not really a LabVIEW question, as it's an operating system question, which boils down to: can I programmatically disable UAC? The answer is no. At least, not without looking like a virus or a hacker. A better solution is to change where you write your files so you work within the operating system, rather than dictating that such a draconian measure be taken just to suit your program.

0 Kudos
Message 2 of 4
(3,773 Views)

See here for more info. 

 

This is another good source of info.

0 Kudos
Message 3 of 4
(3,766 Views)

I realise this is quite an old thread but I still couldn't find an elegant solution in the LabVIEW forum to set file permissions.

 

Have a look here for a VI that can change the file permissions without turning off UAC (as long as the user running the VI has the appropriate rights).

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 4 of 4
(2,948 Views)