Application Cannot Save Files in Vista
I have an application that needs to save some of its data in a file. The
application is installed into the c:\Program Files\Commission Calculator
folder. The application wants to store its data in that same folder.
With all previous versions of Windows this worked fine, but with Vista it
causes a "Can't Save" error (80030103). The file extension is .adtg, but I
suspect it's the folder and/or its related privileges that is preventing the
save operation.
Should I be using a different folder to store these, or does the user need
to change his settings in Vista?
Any information will be greatly appreciated.
Re: Application Cannot Save Files in Vista
Programs should not save data to the Program Files folder, and in Vista,
Windows specifically prohibits this behavior. If you can specify a different
save path for your program, you should do so, or else check with the
developer to see if they have an update of the program that is better
behaved and doesn't save data there. I hope that helps!
--
Dave Johnson
Windows User Assistance team
Microsoft Corporation
Re: Application Cannot Save Files in Vista
Larry
As Dave said, the %systemroot%\Program Files is a restricted area in Vista.
If you have the option in that application to change the path for the
storage of this information, creat a folder somewhere in the
C:\Users\Username folder. A good location is the
C:\Users\Username\AppData\Local\VirtualStore\Program Files, folder. This is
the location where non-Vista compliant applications should be saving their
configuration and other writeable files.
Re: Application Cannot Save Files in Vista
I would warn against saving data directly to the Virtual Store.
If you are a developer for the application, then I would suggest using
the appropriate system folder for what you are storing, as determined by
the SHGetFolderPath and related API's.
http://msdn2.microsoft.com/en-us/library/aa969404.aspx
Re: Application Cannot Save Files in Vista
Thanks, Dave. Can you direct me to any guidelines indicating which folders
developers can use in Vista that are not restricted?
Re: Application Cannot Save Files in Vista
Thanks, Ronnie!! That's a huge help.
Re: Application Cannot Save Files in Vista
Thanks, Jimmy!! I'll read this article in detail and change my application
accordingly.
RE: Application Cannot Save Files in Vista
I have my app data saved in the C:\DATA\ and I also do not have privlages to
save the files. these values are not in the restricted folder?
Re: Application Cannot Save Files in Vista
In Vista, programs generally cannot save data outside of the user
profile folder (c:\users\username\)