LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Error 8 when saving an ini file in C:\Program Files\ without Admin rights

I have built my LabVIEW 7.0 Functional Tester software into an application. During install I use a batch file to copy the limits.ini file to the install directory (Usually C:\Program Files\Wellington\ )

If I log in as administrator (Windows 2k) LabVIEW can write to limits.ini OK. However without Administrator rights LabVIEW can't modify this file (using the Configuration File vi’s) - it returns File Permission Error 8. (It can read the file).

1. Is there a way around this without manually hacking the registry?

2. I tend to put my ini files for my LabVIEW software in the same directory as the LabVIEW exe file. Should I be using a different location (eg the \data directory)?


3. The reason I do not include the *.ini file in the installer is that I can modify it without having to rebuild the app. Instead I get the installer to run a batch file that copies *.ini files from the source directory to the install directory.

Thanks for your help in advance.
Nicholas
0 Kudos
Message 1 of 2
(3,504 Views)
Nick wrote:

> I have built my LabVIEW 7.0 Functional Tester software into an
> application. During install I use a batch file to copy the limits.ini
> file to the install directory (Usually C:\Program Files\Wellington\ )
>
> If I log in as administrator (Windows 2k) LabVIEW can write to
> limits.ini OK. However without Administrator rights LabVIEW can't
> modify this file (using the Configuration File vi’s) - it
> returns File Permission Error 8. (It can read the file).
>
> 1. Is there a way around this without manually hacking the registry?

Give the particular user write access to that directory.

> 2. I tend to put my ini files for my LabVIEW software in the same
> directory as the LabVIEW exe file. Should I be using a different
> location (eg the
\data directory)?

For newer OSes like Unix, and Windows 2k or better yes it would be a
good idea. Unix typically uses a . file in the home directory
of the user. Another idea would be to create a known directory inside
the home directory and put all it's data files there.

LabVIEW 7.0 has a new VI to return the user data directory.

> 3. The reason I do not include the *.ini file in the installer is that
> I can modify it without having to rebuild the app. Instead I get the
> installer to run a batch file that copies *.ini files from the source
> directory to the install directory.

This will only work when you work on the same machine as you developed
it (or at least the same network).

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 2
(3,504 Views)