Results 1 to 4 of 4

Thread: Path/File access error in Vista

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Path/File access error in Vista

    In the latest update to one of our programs a file located at 'C:\Program Files\AppName' was renamed which works OK on all OS except Vista where I (as well as other users) are getting a 'Error 75 Path/File access' error.

    If I right click on the app shortcut and select Run as Administrator the file is renamed without error but the database for the program is now being read from C:\Program File\AppName where previously (on Vista) it was being read from Computer --> C: --> Users --> 'YourUserName' --> AppData --> Local --> VirtualStore --> Program Files --> AppName so when the app opens it's reading the wrong database.

    So my questions are:

    1. Why is the error occurring when attempting to rename the file in C:\Program Files\AppName and how do I overcome this?
    2. During the App Setup (use Inno) can I somehow make sure the App is run as administrator on Vista?

    Thanks.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Path/File access error in Vista

    You overcome this by not placing files in the \Program Files\ folder that need to be modified on Vista. This is Vista 101. You can't get away with these things anymore like you could on prior OS's.

    What you also are experiencing is Virtualization.

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Path/File access error in Vista

    To further this you should do one of the following:

    • Install your app as you have, but on first run you copy the database and all other files that will be modified to the AppData or Local AppData locations for the current user where files can be modified. If all users use the same database then you use the All Users profile location.


    • Modify your app to use the Appdata, local Appdata or All Users location to access your files.

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Path/File access error in Vista

    For more of the issues UAC introduces you might want to read Windows Vista Application Development Requirements for User Account Control Compatibility.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width