|
-
Nov 28th, 2006, 07:53 AM
#1
Thread Starter
Member
[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
-
Nov 28th, 2006, 09:09 AM
#2
Re: Admin and Guest access
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.
-
Nov 28th, 2006, 09:20 AM
#3
Thread Starter
Member
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.
-
Nov 28th, 2006, 11:17 AM
#4
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.
-
Nov 28th, 2006, 12:14 PM
#5
Thread Starter
Member
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.
Thanks for your help.
-
Nov 28th, 2006, 12:26 PM
#6
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).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|