bobthenob Posted December 20, 2005 Share Posted December 20, 2005 Hi Im tyring to make a Cmd file or Autoit file that moves my documentsfrom c: to D: partion if exsitI always move documents to D:when i install windows i cant think how to start thischeers Link to comment Share on other sites More sharing options...
The Black Cloud Posted December 20, 2005 Share Posted December 20, 2005 (edited) use this registry keyfor all users[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]"Common Documents"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,\ 00,6e,00,74,00,73,00,00,00for user[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]"Personal"=hex(2):44,00,3a,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 Edited December 20, 2005 by The Black Cloud Link to comment Share on other sites More sharing options...
bobthenob Posted December 20, 2005 Author Share Posted December 20, 2005 chers ill give that a trythanks for the quick response Link to comment Share on other sites More sharing options...
costi Posted December 20, 2005 Share Posted December 20, 2005 bobthenob: have you tried it? Did it work? Link to comment Share on other sites More sharing options...
Vadikan Posted December 21, 2005 Share Posted December 21, 2005 @costiIf the code scares you, open regedit, locate the keys, make the changes manually, and then export the keys. That way you won't depend on someone else's code. Nothing against The Black Cloud's post, though. Link to comment Share on other sites More sharing options...
costi Posted December 21, 2005 Share Posted December 21, 2005 I tried to use this code (I'm testing the install on Virtual PC), but it when I try to import it it says it's not a correct code and doesn't integrate it o.OI'll try manually and see what I'll get.While we're on the subject:I have a different setup on my machine - I moved the whole "Documents And Settings" folder to partition D: (D:\documents and settings) using junctions from Win2k (linkd.exe tool).If anyone's familiar with this technique, can you tell if there's a way to backup the existing junctions and restore them after reinstall?I have a multi-user setup and creating the junctions is kinda tricky. Last time I was doing it, it took me 3 hours of trial and error - you can imagine I don't feel like going through that again.If copying them is not an option, any other way of migrating Documents And Settings to a different location is welcome. Link to comment Share on other sites More sharing options...
Vadikan Posted December 21, 2005 Share Posted December 21, 2005 @costiThe solution above moves My Documents folder, not Documents and Settings. In order to move the entire Documents and Settings you'd better use [GuiUnattended]ProfilesDir="D:\Documents and Settings\"I never tried to backup and restore the junction points, can't help you. Link to comment Share on other sites More sharing options...
bobthenob Posted December 21, 2005 Author Share Posted December 21, 2005 (edited) "bobthenob: have you tried it? Did it work?"Hi sorry I havent replyed ive been busy. No i coudnt get it to workDo i need to add anything to the reg code?I tryed it on my virtal machine didnt move it ?thanks Edited December 21, 2005 by bobthenob Link to comment Share on other sites More sharing options...
costi Posted December 21, 2005 Share Posted December 21, 2005 @costiThe solution above moves My Documents folder, not Documents and Settings. In order to move the entire Documents and Settings you'd better use [GuiUnattended]ProfilesDir="D:\Documents and Settings\"I never tried to backup and restore the junction points, can't help you.Thanks, I'll try that.I have just one worry about it - won't it overwrite existing folders/settings? Or will this just use the existing ones? Link to comment Share on other sites More sharing options...
Yzöwl Posted December 21, 2005 Share Posted December 21, 2005 The following batch file should suffice@ECHO OFF&SETLOCAL ENABLEEXTENSIONSSET DRIVE=D:SET USF=Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersSET MYDOC=%DRIVE%\%%USERNAME%%\My DocumentsSET MUSIC=%MYDOC%\My MusicSET PICS=%MYDOC%\My PicturesREG ADD "HKCU\%USF%" /V "My Music" /T REG_EXPAND_SZ /D "%MUSIC%" /F >NULREG ADD "HKCU\%USF%" /V "My Pictures" /T REG_EXPAND_SZ /D "%PICS%" /F >NULREG ADD "HKCU\%USF%" /V Personal /T REG_EXPAND_SZ /D "%MYDOC%" /F >NULENDLOCAL&GOTO :EOFJust change the second line to suit! Link to comment Share on other sites More sharing options...
Vadikan Posted December 22, 2005 Share Posted December 22, 2005 (edited) @YzöwlCool! That's for the post-installation phase. winnt.sif is shorter, but it works only during install. Can you explain this line please SET MYDOC=%DRIVE%\%%USERNAME%%\My DocumentsWhat's the %USERNAME% for?I love quick edit feature Edited December 22, 2005 by Vadikan Link to comment Share on other sites More sharing options...
Yzöwl Posted December 22, 2005 Share Posted December 22, 2005 %USERNAME% has been used so that each current or future user will have their own personal folder with the same name as their login name. This folder will be the container for their personal files.If the D: drive, in this case, is using NTFS, then these folders should hopefully be private, security wise, to disallowed users. Link to comment Share on other sites More sharing options...
Vadikan Posted December 22, 2005 Share Posted December 22, 2005 Are you sure you need the double %%? I think they'll result in D:\%USERNAME%\. Try @ECHO OFF&SETLOCAL ENABLEEXTENSIONSSET DRIVE=D:REM ~ SET USF=Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersREM ~ SET MYDOC=%DRIVE%\%%USERNAME%%\My DocumentsECHO %USERNAME%ECHO %DRIVE%\%%USERNAME%%\ECHO %DRIVE%\%USERNAME%\PAUSE Link to comment Share on other sites More sharing options...
costi Posted December 22, 2005 Share Posted December 22, 2005 @YzöwlWhen should I run the batch file? During install (cmdlines.txt?) or after install? Does the SETDRIVE line include the whole path to a user's folder (so if I want to have folders organized as D:\Documents And Settings\USERNAME I should put the whole D:\Documents And Settings as the value of SETDRIVE)?Also, I assume it uses already existing folders? It's important for me, since I want to install on my current comp, where all the user data is already there.Sorry for the probably noobish questions, but it's the first time I'm doing an unattended CD and I don't want to screw things up (especially not something as important as this ). Link to comment Share on other sites More sharing options...
slimzky Posted December 22, 2005 Share Posted December 22, 2005 i moved my documents to "e:\docs"heres my reg tweak that works...Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]"Personal"="E:\\DOCS""My Pictures"="E:\\DOCS\\My Pictures"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]"Common Documents"="E:\\DOCS""CommonPictures"="E:\\DOCS\\My Pictures"i call it at cmdlines.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now