Solved

Where to store data and settings for ALL USERS in a roaming profile environment?

Posted on 2006-10-27
5
230 Views
Last Modified: 2013-12-23
I am going to be deploying a custom application on a clients network.
The application requires access to both User specific data and global
data that needs to be available to all users whoever they are and
wherever they log in (with their roaming profile).  The User Specific info I am storing in:

Documents and Settings\[UserName]\Application Data\MyCustomApp\

As I understand - that will be available to a given user no matter what workstation they log in on.

But how about "All User Data"
Is the same:

Documents and Settings\All Users\Application Data\MyCustomApp\

Folder available to all users no matter where they log in? All users will need to be able to read and write into that directory.  

If that is not the case, what IS the proper way to handle data that needs to be commonly available and shared by all users of an application?  And if it is not the return from the API call ShGetSpecialFolderPath with a CSIDL_APPDATAALL ($0023) What IS the proper call to get to the right place to read and write such data?  

0
Comment
Question by:DMTrump
  • 3
  • 2
5 Comments
 

Author Comment

by:DMTrump
ID: 17824127
Is this so difficult?  In that case, I've increased the point value.

Or is it so simple you don't think it's worth answering?  

If you can give me the answer to this question - please do - earn some points!  

I need to know because I do not have access to a server based Windows network from my development system and I need to have the correct method in place before traveling to my clients site.
0
 
LVL 83

Expert Comment

by:oBdA
ID: 17825299
To start with, do NOT, never, ever, use a hardcoded "Documents and Settings\[UserName]" to access a user's profile. Either use the environment variable %Userprofile%, or use the proper API call to retrieve the user's profile path. Neither "C:\Documents and settings" nor the user profile folder name is a given.
For a user's application data, there's another environment variable %AppData%, and likely a matching API call.

Now, as far as the global settings are concerned, it won't help you anything to store that locally. A roaming user profile is *user* specific, so all that will be roaming is the user's profile folder. Apart from that, how would you share this data network wide if it's stored locally on the machines?
If this data needs to be available for all users at all times, it has to be stored i a network share, not on the machines.
0
 

Author Comment

by:DMTrump
ID: 17825703
Thanks - and your reminder to not use hard-coded paths may help someone else - but I was not doing that anyway.  I'm using the returns from the API call ShGetSpecialFolderPath.  Using a CSIDL_ constant for each path I need.

My question phrased more simply is: Does the path returned by ShGetSpecialFolderPath with  CSIDL_APPDATAALL  point to a directory on the network or is it transfered to the user when his or her profile is loaded?  I sounds as though it is the later.  So I need a call to find a read/writable place on the network.  Is there a CSIDL_ constant that can find that for me?

So you've answered half my question - Now I need method to reliably find a share drive on the network.  Or maybe that can't be determined from a User's computer and has to be set by the network admin seperately for each installation of the application?
0
 
LVL 83

Accepted Solution

by:
oBdA earned 250 total points
ID: 17825738
The network path for the common data is something that should be configured in the application settings, so that the administrator can decide where to put it (and change it later on, if the server moves or whatever).
AppDataAll is a common path for all users on a workstation, and it's (usually) a local path on the workstation; as I said, this is *NOT* part of any roaming profile, and it's of no use for data that should be available network wide.
0
 

Author Comment

by:DMTrump
ID: 17825773
Thanks!  

I also found a much more thorough list of CSIDLs that help explain what I needed to know at
http://tinyurl.com/7hei 
There is for instance a:
CSIDL_NETWORK (0x0012) A virtual folder representing Network Neighborhood, the root of the network namespace hierarchy.
But nothing specific for a commonly accessable work space.  As you said - that is something that seems to be a destination that the Admin must supply to each instance.

I <MUST> get a server based network set up for myself so I can learn more about this stuff!



0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AD health monitoring 2 71
Cisco VPN & Windows File Server 2 82
USB Key with Secure software for Windows and IOS IMac 11 99
Group Policy Question 7 64
A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now