Registry Find & Replace

  • Thread starter Thread starter Pat Garard
  • Start date Start date
P

Pat Garard

G'Day All,

I need to move the 'Documents and Settings' folder from C: drive to D: drive
on a new PC that now has a second HDD.

I have the KB details of how to go about it. One step entails searching the
registry for EVERY instance of 'C:\Documents and...' and replacing it
with 'D:\Documents and...' - there are around 100 such entries.

For safety, I will set a restore point before starting.

Does anybody know of a reliable freeware Registry Editor that would do
this? (I only need to do this once so I am unwilling to invest $too.much).
 
Pat Garard said:
G'Day All,

I need to move the 'Documents and Settings' folder from C: drive to D:
drive
on a new PC that now has a second HDD.

I have the KB details of how to go about it. One step entails searching
the
registry for EVERY instance of 'C:\Documents and...' and replacing it
with 'D:\Documents and...' - there are around 100 such entries.

For safety, I will set a restore point before starting.

Does anybody know of a reliable freeware Registry Editor that would do
this? (I only need to do this once so I am unwilling to invest $too.much).


Just right click on the folder...
then under "properties" select "move"

that's all you have to do...
 
Pardon me for jumping in.
what version of windows xp and build are you using? mine does not have that
options [Version 5.1.2600 Build 2600_xpsp_sp2_gdr.050301-1519 service pack
2].

I think I can change the location my document folder easily enough with the
right click but I just can't find in for c:\documents and setting folders
even as administrator.

However, if one were to download the power toys, changing users folder by
folder can be done by using the tweak UI - still no fun

as for mass change of registries there are two ways
- script: vbs or js - no I don't have the code but I am sure parts of it
can be found under the newsgroups for them
- reg command tool
query root/subkey /s > afile.txt
rem for more details, in dos command try
reg query /?
rem I suspect you have to start with hku, repeat with hklm
edit and replace all occurrences of "c:\documents and settings" with
your new Folder location , save
Caution, be sure to copy completely at least all users if not
everything from the old folder to the new target folder before starting this
process below
reformat afile.txt to use reg add root/subkey /v valuename /type
regType /d "data" /f
you can delete the lines that don't involve any change of folders
copy and paste to command line
still a lot of work unless you have a script to reformat.
- I like this somewhat better:but still not happy
copy the original folder to the new target ( one has to do that
one way or another)
reg query "hklm\software\microsoft\windows
nt\currentversion\profilelist" |findstr "S-1-" >z.txt
for /f
reg add "hklm\software\microsoft\windows
nt\currentversion\profilelist" /v ProfilesDirectory /d "your new target
folder" /f
for /f "usebackq delims=, tokens=1-2" %i in (`reg query
"hklm\software\microsoft\windows nt\currentversion\profilelist" ^| findstr
"S-1-"`) do if 1==1 (
for /f "usebackq delims=, tokens=1,2,3" %j in (`reg query "%i"
/v ProfileImagePath ^| findstr /i "C:\Documents and Settings"`) do @echo
reg add "%i" /v %j /t %k /d "%l" /f >>c.bat
)
edit and change c.bat accordingly, may have to remove a few lines
execute c.bat

Note the above list of command has not been tested. it just illustrates a
concept. Furthermore, it assume no customization of folders or registries
with regard to folder has been done. may still have to deal with
hkcu\software\Microsoft\windows\currentversion\explorer\shell folders, and
maybe user shell folders



if anyone manage to find or create a script to change, please post back
here. of course single click is even nicer
 
gs said:
Pardon me for jumping in.
what version of windows xp and build are you using? mine does not have
that options [Version 5.1.2600 Build 2600_xpsp_sp2_gdr.050301-1519 service
pack 2].

I think I can change the location my document folder easily enough with
the right click but I just can't find in for c:\documents and setting
folders even as administrator.


Well I am also using XP 5.1.2600 sp2
and i can just go to my desktop and right click on "My Documents"
and under properties I get the "move" option
 
so we are talking about "my documents" not " c:\Documents and Settings" .

that is the easy part, but the originator of this thread seems to want to
move "c: \Documents and Settings'" to "d:\Documents and Settings"

philo said:
gs said:
Pardon me for jumping in.
what version of windows xp and build are you using? mine does not have
that options [Version 5.1.2600 Build 2600_xpsp_sp2_gdr.050301-1519
service pack 2].

I think I can change the location my document folder easily enough with
the right click but I just can't find in for c:\documents and setting
folders even as administrator.


Well I am also using XP 5.1.2600 sp2
and i can just go to my desktop and right click on "My Documents"
and under properties I get the "move" option
 
gs said:
so we are talking about "my documents" not " c:\Documents and Settings" .

that is the easy part, but the originator of this thread seems to want to
move "c: \Documents and Settings'" to "d:\Documents and Settings"


<snip>

I guess my "solution" was not quite the one the OP had asked for
 
G'Day (again) All,

What the OP needs......

....Registry Search & Replace.....

Does anybody know of a reliable freeware Registry Editor that would do
this? (I only need to do this once so I am unwilling to invest $too.much).
 
Personally I would consider the option highlighted by Philo and just move
documents folders, let windows deal with the rest.
however if all you want is to take the risk of a blanket search and replace
in the registry a quick google search turns up thousands of options.
eg http://www.4developers.com/regc/ has a 30 day trial and a previous
version to download if $40 is $too much.
I have not tried any of them so please don't blame me if it goes wrong it is
not a recommendation and remember to back up the registry first.
http://support.microsoft.com/kb/322756 - how to back up the registry.

good luck
Martin
 
"Pat Garard" <apgarardATbigpondDOTnetDOTau> wrote in message | G'Day All,
|
| I need to move the 'Documents and Settings' folder from C: drive to D: drive
| on a new PC that now has a second HDD.
|
| I have the KB details of how to go about it. One step entails searching the
| registry for EVERY instance of 'C:\Documents and...' and replacing it
| with 'D:\Documents and...' - there are around 100 such entries.
|
| For safety, I will set a restore point before starting.
|
| Does anybody know of a reliable freeware Registry Editor that would do
| this? (I only need to do this once so I am unwilling to invest $too.much).
| --
| Regards,
| Pat Garard
| Melbourne, Australia
| _______________________

What is the purpose of moving all the settings for 'Documents and Settings' when moving the location of 'My Documents' does all you need to do. You are risking corruption of the 'Documents and Settings' registry settings if you make one wrong move. "My Documents" is actually a redirection that is done within the Windows Explorer shell. Better to let windows handle it.
 
philo said:
gs said:
Pardon me for jumping in.
what version of windows xp and build are you using? mine does
not have that options [Version 5.1.2600 Build
2600_xpsp_sp2_gdr.050301-1519 service pack 2].

I think I can change the location my document folder easily
enough with the right click but I just can't find in for
c:\documents and setting folders even as administrator.


Well I am also using XP 5.1.2600 sp2
and i can just go to my desktop and right click on "My
Documents"
and under properties I get the "move" option

Same here, BTDT after last rebuild and before, too. Just checked;
it's still there.

Pop
 
Back
Top