Common data installation folder on Vista

A

Arial

I had an application on WinXp with
common read/write data shared among all users.

This data was installed in [CommonAppDataFolder]

which on WinXp is in:

C:\Documents and Settings\All Users\Application Data

with read/write enabled for all users



Now I'm rewriting application in C#

and on Vista [CommonAppDataFolder]

points to:

C:\ProgramData which is not

writable by users.



Which is "right" installation directory on Vista

to allow all users write to the same file

for example MS Access mdb.
 
M

Mr. Arnold

Arial said:
I had an application on WinXp with
common read/write data shared among all users.

This data was installed in [CommonAppDataFolder]

which on WinXp is in:

C:\Documents and Settings\All Users\Application Data

with read/write enabled for all users



Now I'm rewriting application in C#

and on Vista [CommonAppDataFolder]

points to:

C:\ProgramData which is not

writable by users.



Which is "right" installation directory on Vista

to allow all users write to the same file

for example MS Access mdb.

Your simplest course of action would be to make an unprotected directory,
not installing into a directory in a protected area, and install the
application and the file into unprotected directory. It's not business as
usual on Vista, like it was for the previous versions of the NT based
O/S(s).
 
P

Pavel Minaev

I had an application on WinXp with
common read/write data shared among all users.

This data was installed in [CommonAppDataFolder]

which on WinXp is in:

C:\Documents and Settings\All Users\Application Data

with read/write enabled for all users

Now I'm rewriting application in C#

and on Vista [CommonAppDataFolder]

points to:

C:\ProgramData which is not

writable by users.

Which is "right" installation directory on Vista

to allow all users write to the same file

for example MS Access mdb.

The correct action, according to "Certified for Vista" prep guide, is
to create your own subdirectory under [CommonAppDataFolder] in your
installer, and assign the rights as needed - i.e. on your .mdb, set
ACL to writable for "Users" (or "Everyone", depending on what exactly
you want).
 
A

Arial

The correct action, according to "Certified for Vista" prep guide, is
to create your own subdirectory under [CommonAppDataFolder] in your
installer, and assign the rights as needed - i.e. on your .mdb, set
ACL to writable for "Users" (or "Everyone", depending on what exactly
you want).

O.K. That sounds reasonable and conforms with
XP logic, but how to achive this
(change ACL) with Visual Studio installer (VS 2008)?

I' dont see any option in it's user interface to set file premissions.

Do I have to switch to another installer, like InnoSetup?
 
P

Pavel Minaev

The correct action, according to "Certified for Vista" prep guide, is
to create your own subdirectory under [CommonAppDataFolder] in your
installer, and assign the rights as needed - i.e. on your .mdb, set
ACL to writable for "Users" (or "Everyone", depending on what exactly
you want).

O.K. That sounds reasonable and conforms with
XP logic,  but how to achive this
(change ACL) with Visual Studio installer (VS 2008)?

I' dont see any option in it's user interface to set file premissions.

I'm not aware of any. VS Setup projects are notoriously limited at
what they can do, and really only suitable for most basic apps.
Do I have to switch to another installer, like InnoSetup?

Likely so. I would suggest that you look at WiX (http://
wix.sourceforge.net/) - it's a de facto standard tool for creating
Windows installers, as it's MS-made, and used by the company itself in
many products (e.g. Visual Studio, Office...). It's pretty low-level,
in that you'll be dealing directly with Windows Installer concepts,
which may be daunting at times... but it'll let you do anything that
is at all possible to do with an MSI. Its other advantage is that it
is being integrated into Visual Studio 2010, so there you'll get WiX
project support out of the box - which makes the choice quite future-
proof.
 
J

jacky kwok

Arial said:
The correct action, according to "Certified for Vista" prep guide, is
to create your own subdirectory under [CommonAppDataFolder] in your
installer, and assign the rights as needed - i.e. on your .mdb, set
ACL to writable for "Users" (or "Everyone", depending on what exactly
you want).

O.K. That sounds reasonable and conforms with
XP logic, but how to achive this
(change ACL) with Visual Studio installer (VS 2008)?

I' dont see any option in it's user interface to set file premissions.

Do I have to switch to another installer, like InnoSetup?


Under the current version VS.
You can add a "Custom Action" in the Setup project and use
the class/function in namespace "System.Security.AccessControl" to set
the access right to the folder/file.

Refer MSDN document about them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top