By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
461,985 Members | 473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 461,985 IT Pros & Developers. It's quick & easy.

Path/File Access Error

P: 1
I created a program using VB6 which has many dependency JPG files. All files are installed in the same subfolder folder of Program Files folder using Package and Deployment Wizard. in VB6.
Everything works fine on WinXp Administrator account however I get an error when that account is a Limited Account:
75 -Sub select(QuestionRange- :Path/File access error.

All the files are automatically installed in a subfolder of the Program Files Folder.
How can I get the program to run on a Limited Account? Can I add something in the program code?

I used the following code:
ImgOutput.Picture = LoadPicture(App.Path & "\" & (Val(Data1) & ".jpg"))

I appreciate any feedback.
Thanks
Klaas
May 20 '07 #1
Share this Question
Share on Google+
2 Replies

Dököll
Expert 100+
P: 2,364
I created a program using VB6 which has many dependency JPG files. All files are installed in the same subfolder folder of Program Files folder using Package and Deployment Wizard. in VB6.
Everything works fine on WinXp Administrator account however I get an error when that account is a Limited Account:
75 -Sub select(QuestionRange- :Path/File access error.

All the files are automatically installed in a subfolder of the Program Files Folder.
How can I get the program to run on a Limited Account? Can I add something in the program code?

I used the following code:
ImgOutput.Picture = LoadPicture(App.Path & "\" & (Val(Data1) & ".jpg"))

I appreciate any feedback.
Thanks
Klaas
Greetings, klaash!

I am not sure if this is done in code. You can however resolve this issue by setting your administrator access from Limited to Computer Administrator, provide of course you are allowed to do this. I am not certain whether thi is work related.

You may consider adding this to the Networking forum if this does not do it for you...
Jun 5 '07 #2

Expert 5K+
P: 8,434
I think there are a couple of possible issues there.
  • For a start, do you know that the user's access is actually the problem, or is that just an assumption? If they are different accounts, then perhaps something else is also different. For example, they could be using shortcuts which start the program in a different directory. There's the directory where the EXE resides, and the "current" directory where you start it. I can never remember which of the two is returned by App.Path, though of course you'd generally expect them to be the same.
  • Is it possible in any way that the user could be trying to load a different image which is not there? I'd suggest some ON ERROR code to display the exact details of what happened, including exactly where in the program (just in case this is actually not the statement producing the error), the value of App.Path and the name of the image it's trying to load.
    Then I would have the limited user try to simply open the JPG file in question, without using your program, just to see what happens.
  • Are both users running the program on the same PC?
  • Could there be different drive mappings so the program can’t find the images? (Probably not, since you’re using App.Path, but I figured it’s worth keeping in mind.)
In short, I recommend gathering more info so you really know what's going on, before trying too hard to solve it.
Jun 5 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.