LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows 7 cannot read file in Windows folder

Hi everyone,

 

my program used to run on XPs. Now it should be on the Win 7.

I saved the configuration of the program into the Windows\System32\... folder. This configuration file is only read but not written. It works on the XP but in Windows 7 the program always shows an error saying "File not found".

I have changed some of the permissions from the folder property and logged in as administrator.

 

What is the best way to set up the permission of the folder to allow me reading the file?

 

Thx. 

0 Kudos
Message 1 of 5
(3,151 Views)

I am just guessing since the paths have changed in Windows 7, this might be causing issues. One way to understand the problem is to have the path set as an indicator so you can verify the path name. Also, another suggestions is to use the Get System Directory.vi which gives the proper folder path based on the directory you are after in the right OS.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(3,146 Views)

The correct answer is that you don't. Microsoft locked down the Windows folder with Windows 7. Program should NOT be writing to that folder as part of their normal operation. They should be writing to the user's application data folder or to the Program Data folder. You can use the Default Data Directory path constant to get a usable directory.

Message 3 of 5
(3,144 Views)

Ah learn something new! Thanks for that!

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 5
(3,139 Views)

I'm starting to get tired of copying and pasting this...

 

 

If you're using Windows 7 64-bit, it may be related to the problems the user was having here:


http://forums.ni.com/t5/LabVIEW/Problem-Using-quot-msg-quot-command-with-quot-System-Exec-vi/m-p/153...

 

 

Windows 7 64-bit redirects applications, so you may need to use a different symbolic directory which will go to the right place.

 

But, as you've been told, using this directory is bad form and Microsoft is finally starting to enfore it.

Message 5 of 5
(3,132 Views)