Is this the right approach for a truly clean install?

Page 2 of 7 FirstFirst 1234 ... LastLast

  1. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #11

    Thanks,

    Just to clarify, is this script correct please:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <FolderLocations>
    <ProfilesDirectory>D:\Users</ProfilesDirectory>
    <ProgramData>C:\ProgramData</ProgramData>
    </FolderLocations>
    </component>
    </settings>


    <cpi: offlineImage cpi:source="wim:X:/sources/install.wim#Windows 7 HOMEPREMIUM" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    What about the two drives in RED, do they need to be changed?

    And this script:

    net stop wmpnetworksvc
    pause
    cd c:\Windows\System32\Sysprep
    c:\Windows\System32\Sysprep\sysprep.exe /oobe /reboot /unattend:F:\relocate.xml

    Thanks.

    EDIT:
    I assume I can put these two Notepad scripts on a USB and then copy them to the C: drive and run them from there?
      My Computer


  2. Posts : 7,351
    Windows 7 HP 64
       #12

    <ProfilesDirectory>D:\Users</ProfilesDirectory>
    must be changed to
    <ProfilesDirectory>F:\Users</ProfilesDirectory>
    as your data drive (\users) will be on F:

    The script is OK
      My Computers


  3. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #13

    I have been away for a while and got back at the weekend.
    I tried to setup my laptop yesterday and have problems.

    I decided to use D: as the Users/Data partition and I: as the Image partition.
    Setting up the partitions went OK after deleting all the partitions except the Disk 0 Partition 1: WINRE.
    I copied both the files below into the D: drive and run the Sysprep from the D: drive by double clicking it.
    BTW, after setting up the D: and I: partitions the DVD drive went to F:.

    Relocate - W7HP.xml code:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <FolderLocations>
    <ProfilesDirectory>D:\Users</ProfilesDirectory>
    <ProgramData>d:\ProgramData</ProgramData>
    </FolderLocations>
    </component>
    </settings>
    <cpifflineImage cpi:source="wim:F:/sources/install.wim#Windows 7 HOMEPREMIUM" xmls:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    Sysprep.cmd code:

    net stop wmpnetworksvc
    pause
    cd c:\Windows\System32\Sysprep
    c:\Windows\System32\Sysprep\sysprep.exe /oobe /reboot /unattend:D:\Relocate- W7HP.xml

    The computer did not reboot automatically, I had to do it manually.

    It dropped me back to where it should have done after the cleanup window appeared and I carried on.
    When the installation was complete I still had the Users/Profiles etc on the C: drive???
    I never got asked for the Product Key either.
    The desktop doesn't look right either, it looks like it hasn't finished installing if you know what I mean!

    Please help!

    Thanks in advance.

    EDIT:
    The laptop is very slow doing anything. Not as it should be for a clean install.
    There are no items in the Startup etc.
    In the D: drive there are only the two files posted above.
    Th max amount of disk space for system protection is set to zero, I know this should be about 10%.
    The screen resolution is also large like when you go into Safe Mode.
    Also when I looked at Turn Windows features on or off it caused a system crash followed by a system restart.

    I am just going through things that I will want to customize when I manage to get the partitions and user profiles sorted out.
    I will obviously be re-installing Windows again because it is certainly not right at the moment.
    Last edited by Paul Black; 03 Jul 2017 at 09:53.
      My Computer


  4. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #14

    Has anyone got any ideas please?
    Thanks in advance.
      My Computer


  5. Posts : 7,351
    Windows 7 HP 64
       #15

    Paul,
    You can, but I don't recomend to move ProgramData from C: to D:
    <ProgramData>C:\ProgramData</ProgramData>

    When you launched Sysprep.cmd, was the Relocate - W7HP.xml at D: root (D:/)?
    Was the Win 7 installation disk on the ODD drive F: when you launched Sysprep.cmd?
      My Computers


  6. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #16

    Thanks for the reply,

    When I got to the stage of CTRL + SHIFT + F3 and then cancelling the System Preparation Tool 3.14 information box, I clicked Start>Computer and then double clicked the D: drive. It told me that the drive needed to be formatted which I did using quick format. I then copied the Relocate - W7HP.xml file to the D: root (D:/) drive which is the drive I want all my data and documents to save to.

    I also copied the Sysprep.cmd file to the D: root (D:/) drive and double clicked it to launch it.

    It appeared that the DVD drive had changed from D: to F:, I assume this is because when I set up the 3 partitions, one for Windows 7 (C:), one for the data and documents (D:) and the other for imaging (E:), that it changed the D: to F:?

    Have I got the coding wrong?
    Is that why it is not working?

    I don't quite understand when you say...
    You can, but I don't recomend to move ProgramData from C: to D:
    < ProgramData>C:\ProgramData</ProgramData>
    ...I just want to allocate the user folders to D: to save all my documents and data to so if C: gets corrupted I will not lose my data..

    Thanks in advance.
      My Computer


  7. Posts : 7,351
    Windows 7 HP 64
       #17

    You can move:
    - C:\users to D:\users with the line <ProfilesDirectory>D:\Users</ProfilesDirectory>
    - C:\ProgramData to D:\ProgramData with the line < ProgramData>D:\ProgramData</ProgramData>

    C:\ProgramData is a system folder where the program configuration files are stored, so I don't recommend moving to D:
    So I would leave ProgramData where it is by default. Set < ProgramData>C:\ProgramData</ProgramData>

    You probably didn't do the right sequence. Read Kari tutorial and follow it.
      My Computers


  8. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #18

    This is the command you told you used when running Sysprep:

    c:\Windows\System32\Sysprep\sysprep.exe /oobe /reboot /unattend:D:\Relocate- W7HP.xml

    There seems to a space in your answer file name between the hyphen and letter W. Earlier on that same post you write the same filename with two spaces, both before and after the hyphen.

    Both would cause Sysprep to fail. Always (I repeat: always!) when a path contains spaces it must be in quotes, in your case like this:

    c:\Windows\System32\Sysprep\sysprep.exe /oobe /reboot /unattend:"D:\Relocate- W7HP.xml"

    Even better would of course be to use simple filenames without spaces or special characters. Why don't you just rename the file as relocate.xml?

    BTW, there are no issues involved in relocating ProgramData folder, too. Windows 7 fully supports relocating it and Users folder. However, in the future, in case you one of these days decide to upgrade to Windows 10, relocated ProgramData prevents the upgrade. Windows 8 and later do no longer support relocating ProgramData; you can upgrade from 7 to 10 with relocated Users folder, but not if ProgramData is relocated, too.

    In addition, I want to quote myself here from the same tutorial on our sister site TenForums.com. It's important to be sure the drive letters remain the same when setup (OOBE) starts after Sysprep. Read the below, ask if it raises any questions:

       Warning
    Please read this before proceeding!

    Windows "likes" to set the the drive ID letters like this:
    • Drive C: > The system drive where Windows will be installed
    • Drive D: > First optical drive (CD / DVD drive)
    • Drive E: > Second partition on the same disk where the C: is located, or in case that disk only has one partition, the first partition on the secondary disk

    Now when you sysprep telling it to move the Users to a specific drive, after the reboot Windows might find that intended target drive for Users folder has another drive ID letter and your intended drive D: is now E:. Sysprep fails and you have to reinstall.

    To be sure you are able to use your chosen partition for the relocated Users folder you need to set the drive letters manually before the sysprep is run. In Audit Mode you can do this for instance with Disk Management by manually changing the drive letters. In below example I want to secure that Users folder will be moved to D drive:
    • Change the optical drive letter to something at the end of the alphabet, I use W:
    • Change the drive letter of the partition or disk you intend to use for the Users folder to D:
    • If the partition or disk you want to use already has a letter D:, change it to something else, close the Disk Management, open it again and change the letter back to D:

    See the tutorial at our sister site the Seven Forums: Drive Letter - Add, Change, or Remove in Windows - Windows 7 Help Forums

    I recommend to always set drive letters manually to override the defaults.
    (Quote from Move Users Folder Location in Windows 10 Windows 10 Installation Upgrade Tutorials )

    Kari
      My Computer


  9. Posts : 7,351
    Windows 7 HP 64
       #19

    Paul, it seems that you haven't follow my instructions from post #4.

    "Edit Relocate - W7HP.xml.txt and change the ODD drive letter to the one you have set on the previous step. Save it as Relocate.xml and put it on the root of the drive that will have \users (D: or U: )"

    What is on Disk 0 Partition 1: WINRE?
    Although you can reenter sysprep from a running windows, I'll recommend you to start from the beginning.
    Follow my instructions on post #4.
      My Computers


  10. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #20

    Thank you both for your replies.

    I am just re-installing again and have got further than on previous occasions.
    I changed the DVD-ROM drive to X:.
    I copied the two files (Relocate.xml & Sysprep.cmd) into the root of D: (after quick formatting) and run the Sysprep.cmd file.

    It is giving me the error:

    Windows could not parse or process unattend answer file.
    [D:\Relocate.xml]. The answer file is invalid. The error was detected at line 11 column 1 of the answer file.

    Here is the code I am using for the Relocate.xml file:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <FolderLocations>
    <ProfilesDirectory>D:\Users</ProfilesDirectory>
    <ProgramData>C:\ProgramData</ProgramData>
    </FolderLocations>
    </component>
    </settings>
    <cpifflineImage cpi:source="wim:X:/sources/install.wim#Windows 7 HOMEPREMIUM" xmls:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    Here is the code I am using for the Sysprep.cmd file:

    net stop wmpnetworksvc
    pause
    cd c:\Windows\System32\Sysprep
    c:\Windows\System32\Sysprep\sysprep.exe /oobe /reboot /unattend:\Relocate.xml

    What is wrong please?

    Thanks in advance.
      My Computer


 
Page 2 of 7 FirstFirst 1234 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:22.
Find Us