Vista Common App Folder

  • Thread starter Thread starter rpotash
  • Start date Start date
R

rpotash

My application creates an access database. I am testing with multiple users.
I log-in to Vista as the Admin. The application starts and places the data
file in C:\ProgramData\MyAppName folder as desired. I then log-out and log-in
as a Standard User and start the Application. It appears Vista then creates a
copy of the file in the C:\ProgramData\MyAppName compatibility folder. So the
problem is, the Admin and the Standard User aren't looking at the same file.
From the documentation I assumed that files in the CSIDL_COMMON_APPDATA
folder were shared by all users of my application, however this doesn't seem
to be happening. Any suggestions on why this is happening and how to resolve
it?
 
rpotash said:
My application creates an access database. I am testing with multiple users.
I log-in to Vista as the Admin. The application starts and places the data
file in C:\ProgramData\MyAppName folder as desired. I then log-out and log-in
as a Standard User and start the Application. It appears Vista then creates a
copy of the file in the C:\ProgramData\MyAppName compatibility folder. So the
problem is, the Admin and the Standard User aren't looking at the same file.
From the documentation I assumed that files in the CSIDL_COMMON_APPDATA
folder were shared by all users of my application, however this doesn't seem
to be happening.

This is happening. Every user can create and read files in
COMMON_APPDATA, but only the user who created the file or the admin
can modify the files in there.
Any suggestions on why this is happening

This is simple: Because the access rights of the folder prohibits the
user making changes. Vista will be so /smart/, to redirect writes to a
virtual storage under the users profile. This isn't helpful, but
prevents the user from such annoying information like "Access denied".
and how to resolve it?

Adjust the access rights for your folder under COMMON_APPDATA.

Thorsten Doerfler
 
I was able to to do this with Vista/Explorer and it worked. Is there a simple
way to set the User Permissions to All for the folder under VB6?
 
rpotash said:
I was able to to do this with Vista/Explorer and it worked. Is there a simple
way to set the User Permissions to All for the folder under VB6?

Everything else than simple:
HOWTO: Set Security on a NTFS Folder Programmatically
http://groups.google.de/group/micro...50d1644be5a/2dd1de4b29e2faf7#2dd1de4b29e2faf7

For further questions on VB6 you better select the appropriate group
which begins with microsoft.public.vb.*. This groups topic is VB.NET.

Thorsten Doerfler
 
Back
Top