shadol Posted January 25, 2005 Share Posted January 25, 2005 As many of you know already when reinstalling windows and formatting the system drive you delete all the files, In an effort to not spend Countless hours Copying Back and Forth all of My Docs and such, I had in the past come upon a way to redirect all the folder lines from an .inf file (ex My Documents, My Music, My Pictures etc. ) during the Unattended installation Process, So here goes what I have so far, cmdlines.txt[commands]"rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\redirect.inf"redirect.inf[Version]Signature = $CHICAGO$[DefaultInstall]AddReg = Reg.SettingsAddReg = Reg.UninstallCopyFiles = Inf.Copy[DefaultUninstall]DelReg = Reg.SettingsDelReg = Reg.UninstallDelFiles = Inf.Copy[Reg.Settings]HKCU,%Folder%,Personal,0x00020000,"%PERSONAL%"HKCU,%Folder%,My Pictures,0x00020000,"%PICTURES%"HKCU,%Folder%,Favorites,0x00020000,"%FAVORITES%"HKCU,%Folder%,My Music,0x00020000,"%MUSIC%"[Reg.Uninstall]HKCU,%Posn%\%NAME%HKCU,%Posn%\%NAME%,DisplayName,,"%NAME%"HKCU,%Posn%\%NAME%,UninstallString\,,"Rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132"\"%53%\Application Data\Custom\redirect.inf"[Inf.Copy]redirect.inf[DestinationDirs]Inf.Copy = 53,Application Data\Custom[SourceDisksNames]55 = %DISKNAME%[SourceDisksFiles]redirect.inf = 55[Strings]Folder = "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"Posn = "Software\Microsoft\Windows\CurrentVersion\Uninstall"PERSONAL = "D:\Documents and Settings\%USERNAME%\My Documents"PICTURES = "D:\Documents and Settings\%USERNAME%\My Documents\My Pictures"FAVORITES = "D:\Documents and Settings\%USERNAME%\Favorites"MUSIC = "D:\Documents and Settings\%USERNAME%\My Documents\My Music"NAME = "Reapers's Folder Redirect"DISKNAME = "Setup Files"Looks Good Huh, So my question would be is, Has anyone else done this and if so do they know how to do the naming of the Desktop. I was thinking [Reg.Settings]HKCU,%Folder%,DESKTOP,0x00020000,"%DESKTOP%"[Strings]DESKTOP = "D:\Documents and Settings\%USERNAME%\Desktop"might work but im not sure...any information would be greatly appreciated, Like a list of availble command lines that i can use. Link to comment Share on other sites More sharing options...
Yzöwl Posted January 25, 2005 Share Posted January 25, 2005 In theory, it should work, but why would you want to? You shouldn't be keeping data on there anyhow, so why not have it recreated clean on each new install.Just one thing I thought I'd mention though, this inf file will be no good to uninstall. If you were to unistall it, there would be no entries for your User Shell Folders. Either add a section for returning the entries to their defaults, or remove the DefaultUninstall and Reg.Uninstall sections.For the former change the following section to something like[DefaultUninstall]DelReg = Reg.BackDelReg = Reg.UninstallDelFiles = Inf.CopyThen add a section something like this[Reg.Back]HKCU,%Folder%,Personal,0x00020000,"%USERPROFILE%\My Documents"HKCU,%Folder%,My Pictures,0x00020000,"%USERPROFILE%\My Documents\My Pictures"HKCU,%Folder%,Favorites,0x00020000,"%USERPROFILE%\Favorites"HKCU,%Folder%,My Music,0x00020000,"%USERPROFILE%\My Documents\My Music" Link to comment Share on other sites More sharing options...
shadol Posted January 25, 2005 Author Share Posted January 25, 2005 In theory, it should work, but why would you want to? You shouldn't be keeping data on there anyhow, so why not have it recreated clean on each new install.Well..I dont understand why I wouldn't be keeping the data on there. I have 20 gigs of pics, almost 5 gigs of docs and 40 gigs of music. IMO its a lot faster and you have less chance of losing anything in the whole process. I do have regulary updated backups of everything, but i dont think goin through 14 dvds at any speed is very efficient. Would you copy all that data back and forth just for a "clean" windows xp install? and yes, Just in case i will add those lines for uninstall, Thanx Link to comment Share on other sites More sharing options...
Yzöwl Posted January 25, 2005 Share Posted January 25, 2005 @ shadolI think you have misunderstood me, I haven't got a problem with your original inf, other than the uninstall comments.I have used this method for a long time now.My comment was regarding the Desktop question, your desktop, shouldn't be full of Data, at the most only shortcuts to other locations etc. therefore you don't need to back it up, cos you will no doubt have to recreate or newly create shortcuts on a new /re-install anyhow. 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