Question about %APPDATA% folder

  • Thread starter Thread starter Jayme Pechan
  • Start date Start date
J

Jayme Pechan

I don't know if it was the right thing to do but in Windows XP, I would
store application settings in the folder contained in the %APPDATA%
environment variable. This was a hidden folder for the user. For some
reason under Vista, the user does not have rights to read and possibly write
to this folder, although it is still there. There is a new AppData folder
that the user does have rights to access but XP does not have this folder.
Someone mentioned %UserProfile%\AppData\Local as the right place but this
doesn't exist on XP so I'm lost as to the proper way to do this.

Does anyone know where to store file based user settings that will work on
both XP and Vista? Thanks.

Jayme
 
Does anyone know where to store file based user settings that will work on
both XP and Vista? Thanks.

The layout of the file system has changed completely in Vista. Therefore,
there is no way that will work on both that does not rely on using
environment variables. Presuming you are doing this in code you need to check
the OS Version and take the action appropriate to the version of the OS you
are running on.
 
Back
Top