Bill Blogs in C#

Bill Wagner discusses C#, LINQ, and other items of interest

Question on Configuration Data and deployment
How to push configuration information out to client computers...

A question:

In Item 37 (Use the Standard Configuration Mechanism) you describe the SpecialFolder.CommonApplicationData parameter to GetFolderPath.

When I read this I thought that you were saying that the file would be copied to all machines in my company (rather like user profiles are copied to a machine at login time). This would be great! But I couldn't find more information about it.

Have I got completely the wrong idea?

Answer:

The purpose of storing application information in the best location is to ensure that you support both multiple users on the machine and users with roaming profiles.

The CommonApplicationData folder is where you store data that should be shared by all users of your application on a single machine. The ApplicationData folder is a per-user setting. It is under a single user’s home tree, and can be modified by roaming profiles. When roaming profiles are created, users will have their home data directories assigned to a network share. Your application will automatically pick up the user’s data from the right location on the network. Of course, the LocalApplicationData folder stores per user data for a particular machine.

Unfortunately, none of this will push a configuration file out to every machine on the network. For that kind of action you’ll need some other mechanism. The practices I discussed in Item 37 make it easier to use that data once it’s pushed out to your users. And, the roaming profiles means that you might be able to push less information to each desktop.

Your original question only hinted at the functionality you are trying to achieve. There are no touch deployment libraries available for .NET 1.1. .NET 2.0 adds integrated support in VS.NET, and additional deployment scenarios. Those may address the probles your are encountering.



Published Monday, May 23, 2005 5:26 AM by wwagner
Filed under:

Comments

No Comments