Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Default installation folders

0 views
Skip to first unread message

hei...@shaw.ca

unread,
Feb 15, 2005, 2:18:21 PM2/15/05
to
Good day all,

I am having an issue with my machine.

It appears that my machine possible thinks there is more than one
user, me and somebody named TEMP. Maybe it doesn't but I'm not sure.
There is only me.

It looks like like all pertinent system info is being directed to
DOCUMENTS AND SETTINGS/TEMP/... instead of DOCS AND SETTING/USER
NAME/...

All application data is also being stored in this TEMP directory. I
finally got this machine to use DOCS AND SETTINGS/USERNAME instead of
the TEMP directory but some other programs are still using it.

Is there a global setting somewhere that says which folders to use?

I try and delete the folder but can't as WNDOWS says it's required, I
can believe that but I always thought TEMP folders are for temporary
storage of files and not permenant storage of system info.

Also whenever I install a piece of software it ignores my folder
(DOCSAND SETTINGS/USERNAME/APPDATA) and puts the all in the
D&S/TEMP/APPDATA

I want it to go where it should and delete all the stuff in the TEMP
folder

Any help/thoughts would be appreciated.

Cheers

Gord

TheBeat999

unread,
Feb 15, 2005, 5:25:18 PM2/15/05
to

<hei...@shaw.ca> wrote in message news:s4fuc01jajcha385m...@4ax.com...

It sounds as though your profile image paths are not defined correctly. They are
listed here:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"ProfilesDirectory"="C:\Documents and Settings"
"AllUsersProfile"="C:\Documents and Settings\All Users"
"DefaultUserProfile"="C:\Documents and Settings\Default"

The ProfilesDirectory should point to the root of all your profile folders. You cannot
change this folder at a later date (actually, you can, but some folders cannot be
moved at all, so this folder must remain in place at all times). The only way to move
ALL profile folders to another drive or folder is to re-install Windows and define the
preferred ProfilesDirectory within your answer file. All folders must NOT exist
beforehand otherwise Windows adds a .NT extension. When the folders already exist,
rename them yourself before installing Windows, then copy your data from the old
folders to the new. You can then delete the old folders.

Personally, I prefer my profiles to be stored under D:\PROFILES. Apart from anything
else, it is much shorter and keeps my data well away from the Windows partition,
making drive images of the system that much easier and quicker.

You can refer to these three folders using the environment variables
%PROFILESDIRECTORY%, %ALLUSERSPROFILE% and %DEFAULTUSERPROFILE%.

Below the key mentioned above, you will find other subkeys (one per identity). Each of
these has a "ProfileImagePath" string value that should be set to the root folder for
each respective identity. One of these is your own profile. Set these up correctly
then reboot the system.

Once the roots are all specified, you can adjust your personal shell folders. They are
listed here:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]

However, you cannot change these directly. Instead, you need to change (or add) your
preferred folders here:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders]

Remember to use %USERPROFILE% when referring to the current user's profile image path.
This keeps your paths consistent. All paths that use environment variables are of type
REG_EXPAND_SZ (the OS will expand the environment variable). You can use either REG_SZ
or REG_EXPAND_SZ for explicit pathnames.

You then need to logoff or reboot the system. Windows will read your preferred choices
from this key and transfer them to Shell Folders key, thus rendering them active.

An altogether easier method is to use Tweak UI for Windows XP. Specify your preferred
shell folders in My Computer\Special Folders.

Note: the All Users shell folders are defined in the same location under
HKEY_LOCAL_MACHINE.

Once everything is set up correctly, export all these keys so you can easily restore
them as needed. All exports can be combined into a single REG file.

hei...@shaw.ca

unread,
Feb 16, 2005, 12:56:32 AM2/16/05
to

Hi

Thank you or the in depth answer.

I went thru your instructions and started looking for the various keys

I navigated [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList] and under that there were no entries
with the captions you mentioned

They being

>"ProfilesDirectory"="C:\Documents and Settings"
>"AllUsersProfile"="C:\Documents and Settings\All Users"
>"DefaultUserProfile"="C:\Documents and Settings\Default"

The only entires were numerical

S-1-5-18 (%system%)
s-1-5-19 (Docs&Settins\localservice)
S-1-5-20 (docs &settings\Network
s-1-5-21 < a very long number>-1004 (Docs&settings\TEMP
s-1-5-21 < a very long number>-1004.bak (Docs&settings\MyUserName
s-1-5-21 < a very long number>-500 (Docs&Settings\ADMIN)


They each had a ProfileImagePath entry which is roughly translated in
brackets

So I'm afraid I am lost what to do next. I imagine from your
descriptionthis is not right.

Any more thoughts? I'd gladly send you a copy of the registry:)

Cheers and Many thanks

Gord


TheBeat999

unread,
Feb 16, 2005, 1:30:31 AM2/16/05
to

<hei...@shaw.ca> wrote in message news:jfn511lehl08ukn6k...@4ax.com...

>
> Hi
>
> Thank you or the in depth answer.
>
> I went thru your instructions and started looking for the various keys
>
> I navigated [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\ProfileList] and under that there were no entries
> with the captions you mentioned
>
> They being
>
>>"ProfilesDirectory"="C:\Documents and Settings"
>>"AllUsersProfile"="C:\Documents and Settings\All Users"
>>"DefaultUserProfile"="C:\Documents and Settings\Default"

You should add the above values if they are missing. Ensure the specified folders
exist (adjusting the locations if necessary).

> The only entires were numerical
>
> S-1-5-18 (%system%)
> s-1-5-19 (Docs&Settins\localservice)
> S-1-5-20 (docs &settings\Network
> s-1-5-21 < a very long number>-1004 (Docs&settings\TEMP
> s-1-5-21 < a very long number>-1004.bak (Docs&settings\MyUserName
> s-1-5-21 < a very long number>-500 (Docs&Settings\ADMIN)
>
>
> They each had a ProfileImagePath entry which is roughly translated in
> brackets
>
> So I'm afraid I am lost what to do next. I imagine from your
> descriptionthis is not right.

No - I am correct and I can see your problem right here:

s-1-5-21 < a very long number>-1004 (Docs&settings\TEMP
s-1-5-21 < a very long number>-1004.bak (Docs&settings\MyUserName

The very long number is your SID (security ID). The second key is a backup of your
original settings - created by whatever malware made these outrageous changes. The
first key is your currently active settings. You simply need to transfer the settings
from the second key to the first key.

Before you begin -- create a restore point.

1. Export the second key and save as SETTINGS.REG.
2. Right-click SETTINGS.REG and select Edit (notepad will open).
3. Remove ALL instances of ".bak" (no quotes).
4. Save the file, overwriting the original.
5. Double-click the file to merge the settings.
6. Reboot.
7. Ensure the settings have "taken", then delete the second key (the one with the
.bak), otherwise restore the system and get back to us.

> Any more thoughts? I'd gladly send you a copy of the registry:)

No thanks. I have my own. :-)


hei...@shaw.ca

unread,
Feb 16, 2005, 2:06:54 AM2/16/05
to

I will work on the changes as you suggested.

AFter I get this part done and sorted out can I assume that if I copy
the contents of the docsandsettings\TEMP folder to my
docsandsettings\USERNAME and then edit via TweakUI the various entries
all should work?

I checked TweakUI and the MyComputer/Special folders and they all
refered to the ETMP folder location instead of the USERNAME folder.

I feel better I can see the light

I see you are in the UK

I spent 6 months this summer, well the calenar said it was summer, in
Manchester

Cheers from Canada

TheBeat999

unread,
Feb 16, 2005, 10:12:08 AM2/16/05
to
<hei...@shaw.ca> wrote in message news:kur5119b3513jld1t...@4ax.com...

>
> I will work on the changes as you suggested.
>
> AFter I get this part done and sorted out can I assume that if I copy
> the contents of the docsandsettings\TEMP folder to my
> docsandsettings\USERNAME and then edit via TweakUI the various entries
> all should work?

Yes -- once the shell folders are sorted, any documents saved in the TEMP profile can
simply be transferred to your profile. The TEMP profile can then be deleted.

> I checked TweakUI and the MyComputer/Special folders and they all
> refered to the ETMP folder location instead of the USERNAME folder.

Once you've update your profile's root folder you'll probably find the shell folders
follow suit unless they are explicitly set to the TEMP folder (they should use the
%USERPROFILE% environment variable). However, Tweak UI will sort out the mess for you
if required.

> I feel better I can see the light
>
> I see you are in the UK

For the time being at least. I'm only here for the beer, as they say.

> I spent 6 months this summer, well the calenar said it was summer, in
> Manchester

Apparently summer was a Tuesday. Around 11am I believe.

hei...@shaw.ca

unread,
Feb 16, 2005, 11:06:28 AM2/16/05
to
I'm sure it will make sesnse when I sit down and put this all together
but just I am a bit confused exactly where I should use %username% and
in what context.

Do you mean when I use TweakUI, everywhere its says TEMP I should
replace with %username% or do I just use it in the Registry and then
let TweakUI clean it up?

Would you be so kind as to give me an example of the syntax?


many thanks

Cheers

Yes tuesday, 1100am a high of 22 degrees :)

TheBeat999

unread,
Feb 16, 2005, 12:57:21 PM2/16/05
to
<hei...@shaw.ca> wrote in message news:e3r611lcrd09puhso...@4ax.com...

> I'm sure it will make sesnse when I sit down and put this all together
> but just I am a bit confused exactly where I should use %username% and
> in what context.
>
> Do you mean when I use TweakUI, everywhere its says TEMP I should
> replace with %username% or do I just use it in the Registry and then
> let TweakUI clean it up?
>
> Would you be so kind as to give me an example of the syntax?

Indeed. The following key tells Windows where your profile's "root" folder is located:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\<your
SID>]
"ProfileImagePath"="C:\Documents and Settings\<your username>"

Note: If you change this value you must reboot to bring it into effect.

From then on you can simply refer to this folder as %USERPROFILE% rather than enter
the path in full (which could lead to inconsistencies).

If you open a command prompt (run CMD) you can view all your current environment
variables by typing SET. One of these is USERPROFILE and will be set to your current
profile folder. The % symbols will not be shown, but they must be used in order to
delimit environment variables. That is, if you typed...

DIR %USERPROFILE%\Desktop

...at a command prompt, you'd get a directory listing of your current desktop folder,
regardless of which folder you were currently in. Note that environment variables are
not case-sensitive. %UserProfile% and %userprofile% are exactly the same.

Your Application Data folder would be defined as follows:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders]

"AppData"="%USERPROFILE%\Application Data"

Windows will then expand this value to create the fully-qualified path:

"C:\Documents and Settings\<your username>\Application Data"

By using %USERPROFILE% you ensure your shell folders are all defined consistently --
meaning everyone's shell folder entries in the registry would be exactly the same.
Only the ProfileImagePath entry need be changed. If your shell folder entries already
use the %USERPROFILE% variable then you need only change the ProfileImagePath entry
and reboot. Your shell folders will automatically point to the correct folders.

To complicate things slightly, you must use REG_EXPAND_SZ values (expandable string
values) when using environment variables within the Windows NT registry (Windows 9x
only permits REG_SZ values). If you export a key containing REG_EXPAND_SZ values, they
will be written in hexadecimal format rather than as text strings. The above would
therefore be exported as:

"AppData"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,41,00,70,00,70,00,6c,00,69,00,63,00,61,00,74,00,69,\
00,6f,00,6e,00,20,00,44,00,61,00,74,00,61,00,00,00

To clarify what this means, each pair of hexadecimal values represents just one
character in the actual string. That is, '25,00' is the hexadecimal representation for
the '%' character. '55,00' is hexadecimal for the 'U' character. Then S, E, R, and so
on. However, just to make things even more complicated, the numbers are actually
written in reverse notation (because that's how they are stored in memory). That is,
'25,00' is actually the reverse notation for 0025 -- which is hexadecimal for decimal
37. And ASCII code 37 is the '%' symbol. The final character (00,00) is a NULL
character which simply marks the end of the string (otherwise known as a
NULL-terminated string).

hei...@shaw.ca

unread,
Feb 16, 2005, 2:30:31 PM2/16/05
to
On Wed, 16 Feb 2005 17:57:21 -0000, "TheBeat999"
<thebe...@yahoo.co.uk> wrote:

Hopefully one last thing


You mention

>Your Application Data folder would be defined as follows:
>
>[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
>Folders]
>
>"AppData"="%USERPROFILE%\Application Data"

I looked for such an entry and it does not exsist in my Registry the
only item at the end of all that is..USER SHELL FOLDERS\NEW with the
entries

(Deflaut) (value not set)
Desktop c:\Documents and Settings\old
Programs same
Start Menu same
Start Up same

Guess I have to add some more stuff...


Cheers

Gord

Are you sure your don't want my registry?

TheBeat999

unread,
Feb 16, 2005, 5:18:04 PM2/16/05
to
<hei...@shaw.ca> wrote in message news:ii7711p8tvlekpa5d...@4ax.com...
> Are you sure your don't want my registry?

Very sure. The only things I really need are your complete SID number and
your username so I can give you a complete REG file that you can simply
merge. However, if you set up your ProfileImagePath correctly, the following
REG snippet will do the rest for you. Copy/paste into notepad and save as
"SHFOLDER.REG" (include the quotes to avoid adding the default
TXT extension). Then double-click the saved file to merge it. Don't forget
to reboot.

<--begin copy next line-->
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"ProfilesDirectory"="C:\\Documents and Settings"
"AllUsersProfile"="C:\\Documents and Settings\\All Users"
"DefaultUserProfile"="C:\\Documents and Settings\\Default"
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders\New]


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders]

"AppData"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,41,00,70,00,70,00,6c,00,69,00,63,00,61,00,74,00,69,\
00,6f,00,6e,00,20,00,44,00,61,00,74,00,61,00,00,00
"Desktop"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,00
"Favorites"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,46,00,61,00,76,00,6f,00,72,00,69,00,74,00,65,00,73,\
00,00,00
"NetHood"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,4e,00,65,00,74,00,48,00,6f,00,6f,00,64,00,00,00
"Personal"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,6d,00,65,\
00,6e,00,74,00,73,00,00,00
"Programs"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,53,00,74,00,61,00,72,00,74,00,20,00,4d,00,65,00,6e,\
00,75,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,73,00,00,00
"SendTo"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,53,00,65,00,6e,00,64,00,54,00,6f,00,00,00
"Start Menu"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,\
00,4c,00,45,00,25,00,5c,00,53,00,74,00,61,00,72,00,74,00,20,00,4d,00,65,00,\
6e,00,75,00,00,00
"Startup"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,53,00,74,00,61,00,72,00,74,00,20,00,4d,00,65,00,6e,\
00,75,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,73,00,5c,00,53,00,\
74,00,61,00,72,00,74,00,75,00,70,00,00,00
"Templates"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,54,00,65,00,6d,00,70,00,6c,00,61,00,74,00,65,00,73,\
00,00,00
"My Pictures"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,\
00,4c,00,45,00,25,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,6d,00,\
65,00,6e,00,74,00,73,00,5c,00,4d,00,79,00,20,00,50,00,69,00,63,00,74,00,75,\
00,72,00,65,00,73,00,00,00
"Local Settings"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,\
49,00,4c,00,45,00,25,00,5c,00,4c,00,6f,00,63,00,61,00,6c,00,20,00,53,00,65,\
00,74,00,74,00,69,00,6e,00,67,00,73,00,00,00
"Local AppData"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,\
49,00,4c,00,45,00,25,00,5c,00,4c,00,6f,00,63,00,61,00,6c,00,20,00,53,00,65,\
00,74,00,74,00,69,00,6e,00,67,00,73,00,5c,00,41,00,70,00,70,00,6c,00,69,00,\
63,00,61,00,74,00,69,00,6f,00,6e,00,20,00,44,00,61,00,74,00,61,00,00,00
"Cache"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,4c,00,6f,00,63,00,61,00,6c,00,20,00,53,00,65,00,74,00,\
74,00,69,00,6e,00,67,00,73,00,5c,00,54,00,65,00,6d,00,70,00,6f,00,72,00,61,\
00,72,00,79,00,20,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,20,00,\
46,00,69,00,6c,00,65,00,73,00,00,00
"Cookies"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,43,00,6f,00,6f,00,6b,00,69,00,65,00,73,00,00,00
"History"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,4c,00,6f,00,63,00,61,00,6c,00,20,00,53,00,65,00,74,\
00,74,00,69,00,6e,00,67,00,73,00,5c,00,48,00,69,00,73,00,74,00,6f,00,72,00,\
79,00,00,00
"Administrative Tools"=hex(2):25,00,41,00,4c,00,4c,00,55,00,53,00,45,00,52,00,\
53,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,53,00,74,00,61,\
00,72,00,74,00,20,00,4d,00,65,00,6e,00,75,00,5c,00,50,00,72,00,6f,00,67,00,\
72,00,61,00,6d,00,73,00,5c,00,41,00,64,00,6d,00,69,00,6e,00,69,00,73,00,74,\
00,72,00,61,00,74,00,69,00,76,00,65,00,20,00,54,00,6f,00,6f,00,6c,00,73,00,\
00,00

<--end copy previous line-->


hei...@shaw.ca

unread,
Feb 16, 2005, 9:07:28 PM2/16/05
to
On Wed, 16 Feb 2005 22:18:04 -0000, "TheBeat999"

Hi again,

You are most helpfull, I'll owe you a Guiness when I get back over
there..

Here is my SID

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList\S-1-5-21-2000478354-1214440339-725345543-1004

And my desired USer Nameis "Gord Heieis"

I will try your suggestion in the meantime.

Once again many thanks

Gord

hei...@shaw.ca

unread,
Feb 16, 2005, 9:30:33 PM2/16/05
to
OK

I went with the intention edit my ProfileList.

I opened ProfileList/S-1-5-21-200078354-1214440339-725345543-1004

under that entry I have

ProfileImagePath REG_EXPAND_SZ %SystemDrive%\Documents and
Settings\TEMP

I take it then that the %SYstemDrive% is a global setting for my "C:"
drive which is the only drive by the way, and is not a problem

I then would continue with;

%SystemDrive%\Documents and Settings\%UserName%

Or should I replace the "%Systemdrive%" with "C:\"

and then copy the contents od the "Docs&Set\TEMP" into my
"Docs&Settings\Gord Heieis"

Reboot (or reboot after the next item?)

and run the little file you sent and in a prefect world it should be
OK?

Cheers

hei...@shaw.ca

unread,
Feb 17, 2005, 1:25:54 AM2/17/05
to
HI TheBeat99

I am leaving on a trip tomorrow morning for a week so I probably will
not be able to check for any replies aftertonite.

Would you be able/willing to email me directly? I'd hate to miss your
help because the thread was purged.

Many thanks again

Gord
heieis at shaw.ca

TheBeat999

unread,
Feb 17, 2005, 2:50:33 AM2/17/05
to
<hei...@shaw.ca> wrote in message news:6qv711hha5t5jntal...@4ax.com...

> OK
>
> I went with the intention edit my ProfileList.
>
> I opened ProfileList/S-1-5-21-200078354-1214440339-725345543-1004
>
> under that entry I have
>
> ProfileImagePath REG_EXPAND_SZ %SystemDrive%\Documents and
> Settings\TEMP
>
> I take it then that the %SYstemDrive% is a global setting for my "C:"
> drive which is the only drive by the way, and is not a problem

%SYSTEMDRIVE% is fine.

> I then would continue with;
>
> %SystemDrive%\Documents and Settings\%UserName%

It would be best to use your actual username here. Remember, you are currently known
as TEMP at this point, so %USERNAME% would be TEMP as well. You don't want that.

> Or should I replace the "%Systemdrive%" with "C:\"

That shouldn't be necessary, but you can if you wish.

> and then copy the contents od the "Docs&Set\TEMP" into my
> "Docs&Settings\Gord Heieis"

No - you should do this after your shell folders are correctly assigned.

> Reboot (or reboot after the next item?)

Reboot after the next item.

> and run the little file you sent and in a prefect world it should be
> OK?

Indeed.

> Cheers

You're welcome.


TheBeat999

unread,
Feb 17, 2005, 2:51:16 AM2/17/05
to
<hei...@shaw.ca> wrote in message news:k2e811d6423v0444h...@4ax.com...

Your REG file has been forwarded via e-mail. Best of luck.


0 new messages