Solved

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

Posted on 2006-10-27
5
240 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
UNC paths question 18 84
AD health monitoring 2 77
Select which programs use which internet connection 15 71
Exchange 2010 smtp and senderbase ratings 3 62
Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 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