Changing USERPROFILE and ALLUSERSPROFILE

R

rmhartman

I would like to move my user folders off the system partition. One
way to do this would be to move them and then use JUNCTION to create
symbolic links to their new location from their old location in "C:
\Documents and Settings". However ... XP has two environment
variables USERPROFILE and ALLUSERSPROFILE, which are what all the
special folders hang off from. What I can not find is where/how
USERPROFILE and/or ALLUSERSPROFILE are ever set. If I could change
them from "C:\Documents and Settings\..." to "E:\Users\..." it should
take care of everything, shouldn't it? But where do these environment
variables get their value pointing to "C:\Documents and Settings" ???
 
R

rmhartman

Not quite. What is there is the explicit path to each special folder,
e.g. "AppData=C:\documents and settings\hartman\AppData". The "c:
\Documents and Settings\hartman" part of that is _from_ the
environment variable USERPROFILE. In HKCU\Software\Microsoft\Windows
\CurrentVersion\Explorer\Shell Folders, there is a setting where the
value is "AppData=%USERPROFILE%\AppData" that gets expanded out and
then stored in the HKCU\...\Shell Folders key.

I want to be able to alter the value in "USERPROFILE" and move the
whole special folders root location.
 
R

rmhartman

Correction below.

Not quite.  What is there is the explicit path to each special folder,
e.g. "AppData=C:\documents and settings\hartman\AppData".    The "c:
\Documents and Settings\hartman" part of that is _from_ the
environment variable USERPROFILE.  In HKCU\Software\Microsoft\Windows
\CurrentVersion\Explorer\Shell Folders, there is a setting where the

Excuse me please. That should be "User Shell Folders" not just "Shell
Folders"
value is "AppData=%USERPROFILE%\AppData" that gets expanded out and
then stored in the HKCU\...\Shell Folders key.

I want to be able to alter the value in "USERPROFILE" and move the
whole special folders root location.

They are stored in..
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
 
Z

Zaphod Beeblebrox

Not quite. What is there is the explicit path to each special folder,
e.g. "AppData=C:\documents and settings\hartman\AppData". The "c:
\Documents and Settings\hartman" part of that is _from_ the
environment variable USERPROFILE. In HKCU\Software\Microsoft\Windows
\CurrentVersion\Explorer\Shell Folders, there is a setting where the
value is "AppData=%USERPROFILE%\AppData" that gets expanded out and
then stored in the HKCU\...\Shell Folders key.

I want to be able to alter the value in "USERPROFILE" and move the
whole special folders root location.
A quick search of the registry shows that 'HKCU\Volitile Environment'
contains a USERPROFILE key. Given the name of the key, it wouldn't
surprise me that any changes would be lost on reboot, but I suppose it
is worth a shot.
 
T

Tecknomage

I would like to move my user folders off the system partition. One
way to do this would be to move them and then use JUNCTION to create
symbolic links to their new location from their old location in "C:
\Documents and Settings". However ... XP has two environment
variables USERPROFILE and ALLUSERSPROFILE, which are what all the
special folders hang off from. What I can not find is where/how
USERPROFILE and/or ALLUSERSPROFILE are ever set. If I could change
them from "C:\Documents and Settings\..." to "E:\Users\..." it should
take care of everything, shouldn't it? But where do these environment
variables get their value pointing to "C:\Documents and Settings" ???


I DO NOT KNOW IF THIS WOULD WORK for USERPROFILE, but...

Since at home I have a single-user WinXP desktop, I wanted "My
Documents" on my D: drive (D: Apps).

I know you can drag-drop a user "My Documents" to another drive, but
that just makes links, and you end up with "Ed's Documents" and "Ed's
Pictures" on the other drive (which I did NOT want).


NOW: The question becomes would the drag-drop [Documents and
Settings] work? If so what would happen?


Need I say, backup your C: FIRST.




NOTE: I did find a way to get "D:\My Documents" that does NOT use
drag-drop.



--
=========== Tecknomage ===========
Computer Systems Specialist
ComputerHelpForum.org Staff Member
IT Technician
San Diego, CA
 
J

John Wunderlich

m:
I would like to move my user folders off the system partition.
One way to do this would be to move them and then use JUNCTION to
create symbolic links to their new location from their old
location in "C: \Documents and Settings". However ... XP has two
environment variables USERPROFILE and ALLUSERSPROFILE, which are
what all the special folders hang off from. What I can not find
is where/how USERPROFILE and/or ALLUSERSPROFILE are ever set. If
I could change them from "C:\Documents and Settings\..." to
"E:\Users\..." it should take care of everything, shouldn't it?
But where do these environment variables get their value pointing
to "C:\Documents and Settings" ???

I believe the procedure for accomplishing this for Windows XP is in the
following Microsoft KB article:

"An error message informs you that you cannot move or rename the
Documents and Settings folder"
< http://support.microsoft.com/kb/314843 >

HTH,
JW
 
R

rmhartman

A quick search of the registry shows that 'HKCU\Volitile Environment'
contains a USERPROFILE key.  Given the name of the key, it wouldn't
surprise me that any changes would be lost on reboot, but I suppose it
is worth a shot.


I will take a look. Although I wonder why my searches of the registry
did not turn that one up ... I guess the question is whether this is
the master, from which the rest depends or whether this is merely
recording the results after startup. Thanks for the lead.
 
R

rmhartman

I would like to move my user folders off the system partition.  One
way to do this would be to move them and then use JUNCTION to create
symbolic links to their new location from their old location in "C:
\Documents and Settings".  However ... XP has two environment
variables USERPROFILE and ALLUSERSPROFILE, which are what all the
special folders hang off from.  What I can not find is where/how
USERPROFILE and/or ALLUSERSPROFILE are ever set.  If I could change
them from "C:\Documents and Settings\..." to "E:\Users\..." it should
take care of everything, shouldn't it?  But where do these environment
variables get their value pointing to "C:\Documents and Settings" ???

I DO NOT KNOW IF THIS WOULD WORK for USERPROFILE, but...

Since at home I have a single-user WinXP desktop, I wanted "My
Documents" on my D: drive (D: Apps).

I know you can drag-drop a user "My Documents" to another drive, but
that just makes links, and you end up with "Ed's Documents" and "Ed's
Pictures" on the other drive (which I did NOT want).

NOW:  The question becomes would the drag-drop [Documents and
Settings] work?  If so what would happen?

Need I say, backup your C: FIRST.

NOTE:  I did find a way to get "D:\My Documents" that does NOT use
drag-drop.

--
=========== Tecknomage ===========
   Computer Systems Specialist
ComputerHelpForum.org Staff Member
           IT Technician
           San Diego, CA

If it were just "My Documents" there is a documented way to accomplish
this. However, that is only a little bit of the user data. Much of
it is stored under "c:\documents and settings\{username}\Application
Data" and "c:\documents and settings\{username}\Local Settings". I
want to move _all_ of the user data to another drive.
 
R

rmhartman

I believe the procedure for accomplishing this for Windows XP is in the
following Microsoft KB article:

"An error message informs you that you cannot move or rename the
Documents and Settings folder"
  <http://support.microsoft.com/kb/314843>

HTH,
  JW

Ok, so you can only really do what I want during installation, you
can't do it afterwards. Yes, they do give a procedure that includes
changing all instances of "C:\Documents and Settings" in the registry
but that approach is a little scary. Also ... what happens when you
create the next new user? Will they end up in the old location or the
new one?
 
J

John Wunderlich

m:
Ok, so you can only really do what I want during installation, you
can't do it afterwards. Yes, they do give a procedure that
includes changing all instances of "C:\Documents and Settings" in
the registry but that approach is a little scary. Also ... what
happens when you create the next new user? Will they end up in
the old location or the new one?

Yes. Unsupported by Microsoft and a little risky but none-the-less
it has been posted on a Microsoft Support page for many years. Not
sure about "new users". That was not a requirement in the original
post.

-- JW.
 
Z

Zaphod Beeblebrox

Ok, so you can only really do what I want during installation, you
can't do it afterwards. Yes, they do give a procedure that includes
changing all instances of "C:\Documents and Settings" in the registry
but that approach is a little scary. Also ... what happens when you
create the next new user? Will they end up in the old location or the
new one?

If you load "c:\Documents and Settings\Default User\NTUser.Dat" into
the registry editor and change all instances of "C:\Documents and
Settings" then save it back out, all new users will get the new
location as well.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top