[RESOLVED] Admin and Guest access
I have a text file I can open for Binary access when logged into XP pro as an Admin but not as a guest, which is causing problems for a corporate customer.
I purposely stored the files in
C:\Documents and Settings\All Users\Application Data\MyFolder\Myfile.dat
thinking everyone has access to these folders, but I get error 75, Path/File access error.
Can anyone please advise?
Thank you
Re: Admin and Guest access
Quote:
C:\Documents and Settings\All Users\Application Data\MyFolder\Myfile.dat
This location is not correct for all the computer because there is possibility of changing the user name on the other computer. So I suggest that put the file at the desktop or in a specific drive.
Re: Admin and Guest access
Ok, sorry, maybe a better description of the path would have been
C:\Documents and Settings\All Users\Application Data\AppFolder\Appfile.dat
The users arent limited in their access to the file by way of their log-in names.
I locate the All Users/Application folder using the Special Folders API (thanks to all who helped me there), I create the dataFolder and the file while an Administrator.
What I need then is a Guest user allowed to read and write to the same file.
Re: Admin and Guest access
Are you trying to just read the file, or write to it aswell?
If you are just trying to read it, specify "INPUT" in the Open line (see the help for exactly where/how to do it).
If you want to write it too, right click on the file and ensure that the permissions allow all users to write to/modify it.
Re: Admin and Guest access
I think my problem was the access.
Another programmer had specified the files for Binary Access, which worked OK if logged in as administrator but gave problems for restricted users.
I used the usual INPUT as you suggested (and I would usually have used myself lol) and everything worked. I had assumed it was the file location giving problems and used most of the afternoon trying to find out why. :blush:
Thanks for your help.
Re: [RESOLVED] Admin and Guest access
Good stuff.. I had a quick check and found I was thinking of the wrong word before! What I was actually thinking of was "Access Read":
VB Code:
Open "c:\TESTFILE" For Binary Access Read As #1
..so you can still open in Binary mode (so no need to change other code).