esas Posted February 8, 2005 Share Posted February 8, 2005 Hi! Here's the situation:I've got a unattended Windows XP installation CD that installs everthing on c:, except the "Documents and Settings" folder. This is created on D: by this tring in winnt.sif.[GuiUNattended] ProfilesDir = "d:\Documents and Settings"My problem is when there already exist a "Documents and Settings" folder on D:with the same users as the ones on my installation CD .I then get foldername like User1.XP2600 (where XP2600 is the machine name) and All Users.WINDOWS.I tried to rename the old "Documents and Settings" folder to ""Documents and Settings.OLD" with "DetachedProgram" in winnt.sif, because this runs before the new "Documents and Settings" folder is created (At T-39). Am I right? It didn't work. Guess it's because I don't have the rights to this or something...??DetachedProgram="%systemdrive%\install\batch.cmd"Batch.cmd:@echo offren "D:/Documents and Settings" "Documents and Settings.OLD"My final goal is to copy all the stuff from the old user folders to the new ones.Can anyone help me?? Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 8, 2005 Share Posted February 8, 2005 Not A 100 percent but It should be this maybeDetachedProgram="%systemdrive%\install\batch.cmd"DetachedProgram="%systemdrive%\install\batch.bat"Old Batch@echo offren "D:/Documents and Settings" "Documents and Settings.OLD"New Batch@echo offif exist "D:\Documents and Settings" ren "D:\Documents and Settings" "DocSettingBak"Hope This Helps Link to comment Share on other sites More sharing options...
`Felix` Posted February 8, 2005 Share Posted February 8, 2005 Try this solution http://www.msfn.org/board/index.php?showto...ndpost&p=261309 Link to comment Share on other sites More sharing options...
esas Posted February 8, 2005 Author Share Posted February 8, 2005 Thanks Felix!Looks like this is what i'm looking for.But can you tell me when this is going to be run..? And where to put the required 3rd party utilities for the batch to work. Didn't figure that out by myself.Thanks! Link to comment Share on other sites More sharing options...
`Felix` Posted February 8, 2005 Share Posted February 8, 2005 Thanks Felix!Looks like this is what i'm looking for.But can you tell me when this is going to be run..? And where to put the required 3rd party utilities for the batch to work. Didn't figure that out by myself.Thanks!ok this runs when a user logs on after an upgrade or rebuild. The best place for it is in the default user NTUSER.DAT hive under HKCU\Software\Microsoft\Windows\CurentVersion\RunOnceIf you want to know how to add commands to the NTUSER.DAT hive during unattended installs - have a look at he link at the bottom of my signature. read the guide carefully and you will find out how to do this safely. If you want some more help let me know.The 3rd party utils - just put them in %systemdrive%\windows\system32 then they will run from anywhere. Link to comment Share on other sites More sharing options...
esas Posted February 8, 2005 Author Share Posted February 8, 2005 hmm.. I't won't work. I must be doing something wrong.Would you mind giving me a detailed description on how to do this.I would be very thankful.Hope this isn't to much trouble. Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 8, 2005 Share Posted February 8, 2005 (edited) Try This As A TestOnly If You Have 2 Or More PartitionsCopy Your Doc And Setting To A EmptyPartition.Run This ScriptThe Script Function Is To Change These 5 FoldersDocuments and Settings\All UsersDocuments and Settings\Default UserDocuments and Settings\LocalServiceDocuments and Settings\NetworkServiceDocuments and Settings\To ThisDocSettingBak\AllUserBak1DocSettingBak\DefaultUserBak1DocSettingBak\LocalServicerBak1DocSettingBak\NetworkServiceBak1DocSettingBakFor Testing I Added A Repair Option That Just Renames Them Back To The Defualts Edit The script To Your needs.Orange Is What Can Be Removed Or Left InRed Do Not Edit Unless You Know What You Are Doingecho offclscolor F3attrib -s -h -r "%CD%\Documents and Settings":Menu1clsMode Con: Cols=55 Lines=7color F3attrib -s -h -r "%CD%\Documents and Settings"Echo.echo Type Yes To Rename Documents and Settings echo Type R1 If You Ran This Before And Want Set Echo The Names To DefualtEcho Type Quit Exitset /p select= Waiting-^> IF NOT '%select%'=='' SET select=%select:~0,4%IF /I '%select%'=='Yes' GOTO Rename1IF /I '%select%'=='Quit' GOTO QuitIF /I '%select%'=='R1' GOTO Repair1IF /I '%select%'=='Q' GOTO QUITIF /I '%select%'=='select' GOTO OPS:OPSclscolor B2Mode Con: Cols=55 Lines=3color b2Echo.Echo %select% Echo Was Not A Valid Type Reply Again!ping -n 2 127.0.0.1>nulgoto Menu1:Rename1attrib -s -h -r "%CD%\Documents and Settings"if exist "%CD%\Documents and Settings\All Users\" ren "%CD%\Documents and Settings\All Users" "AllUserBak1"if exist "%CD%\Documents and Settings\Default User\" ren "%CD%\Documents and Settings\Default User" "DefaultUserBak1"if exist "%CD%\Documents and Settings\LocalService\" ren "%CD%\Documents and Settings\LocalService" "LocalServicerBak1"if exist "%CD%\Documents and Settings\NetworkService\" ren "%CD%\Documents and Settings\NetworkService" "NetworkServiceBak1"if exist "%CD%\Documents and Settings\" ren "%CD%\Documents and Settings" "DocSettingBak"mkdir "%CD%\Documents and Settings":Menu2clsMode Con: Cols=55 Lines=7color 1fEcho.echo Type Yes To Rename Them Back To Defualt Echo Type Quit Exitset /p Repair= Waiting-^> IF NOT '%Repair%'=='' SET select=%select:~0,4%IF /I '%Repair%'=='Yes' GOTO Repair1IF /I '%Repair%'=='Quit' GOTO QuitIF /I '%Repair%'=='select' GOTO OPS1:OPS1clscolor B2Mode Con: Cols=55 Lines=3color b2Echo.Echo %select% Echo Was Not A Valid Type Reply Again!ping -n 2 127.0.0.1>nulgoto Menu2:Repair1if exist "%CD%\Documents and Settings" Rmdir /s /q "%CD%\Documents and Settings" Goto R2if not exist "%CD%\Documents and Settings" Goto R2:r2if exist "%CD%\DocSettingBak\" ren "%CD%\DocSettingBak" "Documents and Settings"if exist "%CD%\Documents and Settings\AllUserBak1\" ren "%CD%\Documents and Settings\AllUserBak1" "All Users"if exist "%CD%\Documents and Settings\DefaultUserBak1\" ren "%CD%\Documents and Settings\DefaultUserBak1" "Default User"if exist "%CD%\Documents and Settings\LocalServicerBak1\" ren "%CD%\Documents and Settings\LocalServicerBak1" "LocalService"if exist "%CD%\Documents and Settings\C:\Documents and Settings\NetworkServiceBak1\" ren "%CD%\Documents and Settings\NetworkServiceBak1" "NetworkService":Quitattrib +s "%CD%\Documents and Settings"goto EOFexitI Have Tested This On C:\, D:\, H:\, L:\ Drives Edited December 29, 2005 by gunsmokingman Link to comment Share on other sites More sharing options...
`Felix` Posted February 9, 2005 Share Posted February 9, 2005 hmm.. I't won't work. I must be doing something wrong.Would you mind giving me a detailed description on how to do this.I would be very thankful.Hope this isn't to much trouble.Are you working from a Unattend installation point of view or manual installation? Link to comment Share on other sites More sharing options...
esas Posted February 9, 2005 Author Share Posted February 9, 2005 Unattended winxp SP2 Link to comment Share on other sites More sharing options...
esas Posted February 17, 2005 Author Share Posted February 17, 2005 Hi!I've been trying out different soulutions the past few days, but i'm not there yet. gunsmokingman: tried your command-file. Did some modification so that I could run it as DetachedProgram. Also had to add "/D" to the attrib command.But it won't work. Can't figure out why. Works fine when I test it, but not during install... `Felix`: Thanks for your help so far. Got your program working. Don't know happened the first time I tried it. Must have been to tired or something. This was just what I was looking for.There's just one problem. When I do a install, the "Default Users" folder already exist. The installer then creates "Default Users.WINDOWS".My command file loads and unloads the NTUSER.DAT hive in "Default Users" (when it should be using "Default Users.WINDOWS". I tried renaming the old folder with DetachedProgram launched from winnt.sif. (used gunsmokingmans tips), but as I've allready said it didn't work.Any tips??? Link to comment Share on other sites More sharing options...
`Felix` Posted February 17, 2005 Share Posted February 17, 2005 `Felix`: Thanks for your help so far. Got your program working. Don't know happened the first time I tried it. Must have been to tired or something. This was just what I was looking for.Glad to hear it worked for you There's just one problem. When I do a install, the "Default Users" folder already exist. The installer then creates "Default Users.WINDOWS".My command file loads and unloads the NTUSER.DAT hive in "Default Users" (when it should be using "Default Users.WINDOWS". I tried renaming the old folder with DetachedProgram launched from winnt.sif. (used gunsmokingmans tips), but as I've allready said it didn't work.Any tips???<{POST_SNAPBACK}>It is still a work in progress and i have so far only worked on the current user... i will be adding the default user and all users to this. Over the next few days i plan to get back to working on this... stay tuned will post updates as they become available. What i really need is someone that knows VB so we can get this into an application when finish Link to comment Share on other sites More sharing options...
`Felix` Posted February 21, 2005 Share Posted February 21, 2005 There's just one problem. When I do a install, the "Default Users" folder already exist. The installer then creates "Default Users.WINDOWS".My command file loads and unloads the NTUSER.DAT hive in "Default Users" (when it should be using "Default Users.WINDOWS". I tried renaming the old folder with DetachedProgram launched from winnt.sif. (used gunsmokingmans tips), but as I've allready said it didn't work.Any tips???<{POST_SNAPBACK}>Should have an all in one solution for this later this afternoon or tomorrow morning... am just doing some final testing and tweaking. Stay tuned to this link MSFN -> Duplicated User Accounts... Link to comment Share on other sites More sharing options...
esas Posted February 21, 2005 Author Share Posted February 21, 2005 NICE!!!!! Looking forward to it...!! Link to comment Share on other sites More sharing options...
esas Posted March 2, 2005 Author Share Posted March 2, 2005 Should have an all in one solution for this later this afternoon or tomorrow morning... am just doing some final testing and tweaking. Are you having problems Felix?? Anything I might help you with?? Link to comment Share on other sites More sharing options...
`Felix` Posted March 2, 2005 Share Posted March 2, 2005 Should have an all in one solution for this later this afternoon or tomorrow morning... am just doing some final testing and tweaking.Are you having problems Felix?? Anything I might help you with??<{POST_SNAPBACK}>Hi ya,yep did have some problems which are all sorted bar one. I should have something to post in the next day or so... It's looking very good though 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