sangupta
sangupta

Reputation: 2406

Location of %allusersprofile% folder in Windows Vista?

What is the exact path to %allusersprofile% folder in Windows Vista? On some systems, I have seen the folder as 'c:\Users\All Users', on some it is mapped to 'C:\ProgramData', while on others it has been mapped to 'C:\Users\Public'.

If you can provide link to microsoft documentation reference would be highly helpful (so far I have been unable to dig the link out).

Edit: Registry settings do define the location of the folder. What I am looking for is more towards how Windows interprets/defines these folders at installation time? What is the default location of this folder as defined by Microsoft Windows Vista?

Upvotes: 3

Views: 30314

Answers (3)

Larry Osterman
Larry Osterman

Reputation: 16142

Why do you care? Just use the environment variable (or the KnownFolderId, that's guaranteed to work forever.

Microsoft might decide tomorrow to move the directory to another location - as long as you continue to use the environment variable you'll be ok.

If you hard code the value, your code will break in the future.

Upvotes: 4

Hemant
Hemant

Reputation: 19826

I found these special folder location confusing sometimes. I created a sheet comparing the folder locations on Windows XP and Vista. That may be useful to you. Here is the link.

Upvotes: 1

paxdiablo
paxdiablo

Reputation: 882146

This document on MSDN shows the new methods in Vista to locate known folders, including the one you ask about specifically: "C:\Documents and Settings".

I gather this can be changed simply by changing the registry (and moving the current directory).

Upvotes: 2

Related Questions