|
-
May 22nd, 2008, 07:46 PM
#1
Thread Starter
PowerPoster
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.
-
May 22nd, 2008, 07:57 PM
#2
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.
-
May 22nd, 2008, 08:03 PM
#3
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.
-
May 22nd, 2008, 08:41 PM
#4
Re: Path/File access error in Vista
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
|