Welcome Guest Search | Active Topics | Members | Log In | Register

VS2008 SpecialDirectories.AllUsersApplicationData vs. Setup Project [CommonAppDataFolder] Options · View
Dan Stevens
Posted: Sunday, April 06, 2008 11:24:42 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 06/04/2008 11:24:42
Date: Sun, 06 Apr 2008 15:24:42 -0400

It appears that SpecialDirectories.AllUsersApplicationData refers to the
following folder in Vista
C:\ProgramData\[Manufacturer]\[ProductName]\[ProductVersion]

I would prefer to reference the following:
C:\Documents and Settings\All Users\Application
Data\[Manufacturer]\[ProductName]
It appears this is the same as "[CommonAppDataFolder]" in my Setup
Project(File System on Target Machine-->Add Special Folder...)

1. Is there a reason the AllUsersApplicationData differs from
CommonAppDataFolder?

2. Is one location preferred over the other?

3. Why are there differences between
coding - My.Computer.FileSystem.SpecialDirectories...
and
deployment - File System on Target Machine-->Add Special Folder...

4. If I want the data to be shared amongst users, and I don't want the
data-store location to change when I change the version of my app...
....what is the preferred location, and how do I refer to it in coding &
deployment?

Dan Stevens
Posted: Monday, April 07, 2008 5:11:58 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 07/04/2008 05:11:58
Date: Mon, 07 Apr 2008 09:11:58 -0400

Steven-
Thank you very much. I was able to make your suggestion work.
I used:
System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData)
and
[CommonAppDataFolder] in the Setup Project

I also discovered that apparently C:\Documents and Settings\All
Users\Application Data\ is aliased in Vista as C:\ProgramData\.
I knew Unix did that sort of thing...but this is the first time I've
noticed Windows doing it.

Thank$ a million!


Steven Cheng [MSFT] wrote:
> Hi Dan,
>
> As for the special directories(in VBNET app) and the Speical folders in
> setup project, there does exists difference between them. Actually, the
> VBNET's speical directories may add some addtional value into
> ApplicationPath(such as app name and version number). While the setup
> project's special folder is mainly related to what is commonly used for
> setup a program. here is a list of setup project's folders:
>
> #Special Folders and Custom Folders
> http://msdn2.microsoft.com/en-us/library/s2esdf4x(VS.80).aspx
>
> Also, in .net framework, you can use the System.Environment.SpecialFolder
> enum to get a list of common folders on windows system:
>
> #Environment..::.SpecialFolder Enumeration
> http://msdn2.microsoft.com/en-us/library/system.environment.specialfolder.as
> px
>
> The Environment.SpecialFolder.CommonApplicationData seems point to the
> "Documents Settings\All Users\Application Data". For the
> "AllUsersApplicationData " in VBNET SpecialDirectories class, it is a
> parituclar one implemented in VB.NET which doesn't quite conform to the
> CommonApplicationData Location. I think you use the
> System.Enviornment.SpecialFolders enum.
>
> For sharing data among all users, the common approach is put the data file
> with your application exe together in the Program Files installed folder.
> Or you can use a central server (database) to store large amount of data.
> On vista, there is virtualization feature, this may affect your application
> that access shared , system location. You need to elevate the application
> at admin privilege to access those location. here is an article mentioned
> this:
>
> #Folder Virtualization in Windows Vista
> http://www.west-wind.com/WebLog/posts/5584.aspx
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> --------------------
>> Date: Sun, 06 Apr 2008 15:24:42 -0400
>> From: Dan Stevens <TOADLLC@newsgroup.nospam>
>> User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)
>
>> It appears that SpecialDirectories.AllUsersApplicationData refers to the
>> following folder in Vista
>> C:\ProgramData\[Manufacturer]\[ProductName]\[ProductVersion]
>>
>> I would prefer to reference the following:
>> C:\Documents and Settings\All Users\Application
>> Data\[Manufacturer]\[ProductName]
>> It appears this is the same as "[CommonAppDataFolder]" in my Setup
>> Project(File System on Target Machine-->Add Special Folder...)
>>
>> 1. Is there a reason the AllUsersApplicationData differs from
>> CommonAppDataFolder?
>>
>> 2. Is one location preferred over the other?
>>
>> 3. Why are there differences between
>> coding - My.Computer.FileSystem.SpecialDirectories...
>> and
>> deployment - File System on Target Machine-->Add Special Folder...
>>
>> 4. If I want the data to be shared amongst users, and I don't want the
>> data-store location to change when I change the version of my app...
>> ...what is the preferred location, and how do I refer to it in coding &
>> deployment?
>>
>>
>
Steven Cheng [MSFT]
Posted: Monday, April 07, 2008 6:01:59 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 07/04/2008 06:01:59
Date: Mon, 07 Apr 2008 06:01:59 GMT

Hi Dan,

As for the special directories(in VBNET app) and the Speical folders in
setup project, there does exists difference between them. Actually, the
VBNET's speical directories may add some addtional value into
ApplicationPath(such as app name and version number). While the setup
project's special folder is mainly related to what is commonly used for
setup a program. here is a list of setup project's folders:

#Special Folders and Custom Folders
http://msdn2.microsoft.com/en-us/library/s2esdf4x(VS.80).aspx

Also, in .net framework, you can use the System.Environment.SpecialFolder
enum to get a list of common folders on windows system:

#Environment..::.SpecialFolder Enumeration
http://msdn2.microsoft.com/en-us/library/system.environment.specialfolder.as
px

The Environment.SpecialFolder.CommonApplicationData seems point to the
"Documents Settings\All Users\Application Data". For the
"AllUsersApplicationData " in VBNET SpecialDirectories class, it is a
parituclar one implemented in VB.NET which doesn't quite conform to the
CommonApplicationData Location. I think you use the
System.Enviornment.SpecialFolders enum.

For sharing data among all users, the common approach is put the data file
with your application exe together in the Program Files installed folder.
Or you can use a central server (database) to store large amount of data.
On vista, there is virtualization feature, this may affect your application
that access shared , system location. You need to elevate the application
at admin privilege to access those location. here is an article mentioned
this:

#Folder Virtualization in Windows Vista
http://www.west-wind.com/WebLog/posts/5584.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

This posting is provided "AS IS" with no warranties, and confers no rights.



>Date: Sun, 06 Apr 2008 15:24:42 -0400
>From: Dan Stevens <TOADLLC@newsgroup.nospam>
>User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)

>
>It appears that SpecialDirectories.AllUsersApplicationData refers to the
>following folder in Vista
>C:\ProgramData\[Manufacturer]\[ProductName]\[ProductVersion]
>
>I would prefer to reference the following:
>C:\Documents and Settings\All Users\Application
>Data\[Manufacturer]\[ProductName]
>It appears this is the same as "[CommonAppDataFolder]" in my Setup
>Project(File System on Target Machine-->Add Special Folder...)
>
>1. Is there a reason the AllUsersApplicationData differs from
>CommonAppDataFolder?
>
>2. Is one location preferred over the other?
>
>3. Why are there differences between
>coding - My.Computer.FileSystem.SpecialDirectories...
>and
>deployment - File System on Target Machine-->Add Special Folder...
>
>4. If I want the data to be shared amongst users, and I don't want the
>data-store location to change when I change the version of my app...
>...what is the preferred location, and how do I refer to it in coding &
>deployment?
>
>

Steven Cheng [MSFT]
Posted: Tuesday, April 08, 2008 2:37:37 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 08/04/2008 02:37:37
Date: Tue, 08 Apr 2008 02:37:37 GMT

Thanks for your reply Dan,

Yes, in windows Vista, the user profile folder hierarchy has changed a
bit(make it more simple and elegant ) from previous versions. Anyway, I'm
glad that you've got it working.

Have a nice day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.


>Date: Mon, 07 Apr 2008 09:11:58 -0400
>From: Dan Stevens <TOADLLC@newsgroup.nospam>
>User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)
>MIME-Version: 1.0
>Subject: Re: VS2008 SpecialDirectories.AllUsersApplicationData vs. Setup
Project
l
>
>Steven-
>Thank you very much. I was able to make your suggestion work.
>I used:
>System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApp
licationData)
>and
>[CommonAppDataFolder] in the Setup Project
>
>I also discovered that apparently C:\Documents and Settings\All
>Users\Application Data\ is aliased in Vista as C:\ProgramData\.
>I knew Unix did that sort of thing...but this is the first time I've
>noticed Windows doing it.
>
>Thank$ a million!
>
>
>Steven Cheng [MSFT] wrote:
>> Hi Dan,
>>
>> As for the special directories(in VBNET app) and the Speical folders in
>> setup project, there does exists difference between them. Actually, the
>> VBNET's speical directories may add some addtional value into
>> ApplicationPath(such as app name and version number). While the setup
>> project's special folder is mainly related to what is commonly used for
>> setup a program. here is a list of setup project's folders:
>>
>> #Special Folders and Custom Folders
>> http://msdn2.microsoft.com/en-us/library/s2esdf4x(VS.80).aspx
>>
>> Also, in .net framework, you can use the
System.Environment.SpecialFolder
>> enum to get a list of common folders on windows system:
>>
>> #Environment..::.SpecialFolder Enumeration
>>
http://msdn2.microsoft.com/en-us/library/system.environment.specialfolder.as
>> px
>>
>> The Environment.SpecialFolder.CommonApplicationData seems point to the
>> "Documents Settings\All Users\Application Data". For the
>> "AllUsersApplicationData " in VBNET SpecialDirectories class, it is a
>> parituclar one implemented in VB.NET which doesn't quite conform to the
>> CommonApplicationData Location. I think you use the
>> System.Enviornment.SpecialFolders enum.
>>
>> For sharing data among all users, the common approach is put the data
file
>> with your application exe together in the Program Files installed
folder.
>> Or you can use a central server (database) to store large amount of
data.
>> On vista, there is virtualization feature, this may affect your
application
>> that access shared , system location. You need to elevate the
application
>> at admin privilege to access those location. here is an article
mentioned
>> this:
>>
>> #Folder Virtualization in Windows Vista
>> http://www.west-wind.com/WebLog/posts/5584.aspx
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> Delighting our customers is our #1 priority. We welcome your comments
and
>> suggestions about how we can improve the support we provide to you.
Please
>> feel free to let my manager know what you think of the level of service
>> provided. You can send feedback directly to my manager at:
>> msdnmg@microsoft.com.
>>
>> ==================================================
>> Get notification to my posts through email? Please refer to
>>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
>> This posting is provided "AS IS" with no warranties, and confers no
rights.
>>
>>
>> --------------------
>>> Date: Sun, 06 Apr 2008 15:24:42 -0400
>>> From: Dan Stevens <TOADLLC@newsgroup.nospam>
>>> User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)
>>
>>> It appears that SpecialDirectories.AllUsersApplicationData refers to
the
>>> following folder in Vista
>>> C:\ProgramData\[Manufacturer]\[ProductName]\[ProductVersion]
>>>
>>> I would prefer to reference the following:
>>> C:\Documents and Settings\All Users\Application
>>> Data\[Manufacturer]\[ProductName]
>>> It appears this is the same as "[CommonAppDataFolder]" in my Setup
>>> Project(File System on Target Machine-->Add Special Folder...)
>>>
>>> 1. Is there a reason the AllUsersApplicationData differs from
>>> CommonAppDataFolder?
>>>
>>> 2. Is one location preferred over the other?
>>>
>>> 3. Why are there differences between
>>> coding - My.Computer.FileSystem.SpecialDirectories...
>>> and
>>> deployment - File System on Target Machine-->Add Special Folder...
>>>
>>> 4. If I want the data to be shared amongst users, and I don't want the
>>> data-store location to change when I change the version of my app...
>>> ...what is the preferred location, and how do I refer to it in coding &
>>> deployment?
>>>
>>>
>>
>

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.077 seconds.