Path/File Access Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klaash
    New Member
    • May 2007
    • 1

    #1

    Path/File Access Error

    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(Question Range- :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.Pictu re = LoadPicture(App .Path & "\" & (Val(Data1) & ".jpg"))

    I appreciate any feedback.
    Thanks
    Klaas
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by klaash
    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(Question Range- :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.Pictu re = 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...

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      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.

      Comment

      Working...