OEM Recovery Partition Creator for Windows

Discussion in 'MDL Projects and Applications' started by AnarethoS, Sep 11, 2010.

  1. mckinnon81

    mckinnon81 MDL Novice

    Nov 30, 2013
    5
    0
    0
    I have done a bit more testing with your script.

    I disabled the SHUTDOWN line in the script so I can check for any error messages that may appear and I found the following under the SYSPREPING THE COMPUTER section
    REAGENTC.EXE: Operation failed: 4c7
    REAGENTC.EXE: An error has occurred.

    It appears when trying to run REAGENTC /ENABLE

    I also ran REAGENTC /INFO after running the script and before rebooting and got the following.

    C:\Installer>reagentc /info
    Windows Recovery Environment (Windows RE) and system reset configuration
    Information:


    Windows RE status: Disabled
    Windows RE location:
    Boot Configuration Data (BCD) identifier: 00000000-0000-0000-0000-0000000000
    00
    Recovery image location:
    Recovery image index: 0
    Custom image location:
    Custom image index: 0


    REAGENTC.EXE: Operation Successful.

    If I run REAGENTC /ENABLE manually I get

    REAGENTC.EXE: Unable to update Boot Configuration Data.


    Hope this helps
     
  2. samfrench

    samfrench MDL Novice

    Dec 7, 2013
    2
    0
    0
    Hi !

    I'm french sorry to my English
    For begin, Thanks Anarethos (and congratulations) :clap3:

    With Windows 8.1, all is OK :biggrin: but no WinRE :( : computer reboot but no into the recovery environment
    I test version 1.3.15 vs 1.3.16 : All is ok but no WinRE (only)
    (syspred Ok, partition recovery ok, USB/DVD ok, image oK, ect... )


    1) Are you using MBR/BIOS or GPT/UEFI version?
    => GPT/UEFI

    2) Using WIM on first partition or WIM on last partition?
    => WIM FIRST

    3) Do you have more that 1 fixed drive in your computer?
    => Only 1 SSD disk 0 (+ 1 HDD never activate/no format)

    4) Are you using a drive with HDD+FLASH on it?
    => NO

    5) Did you have modified any of the comfiguration file?
    => Settings.ini ("Logotime=5", langage french only)
    => SettingsRE.txt ("LANG=FR-FR" only)
    => Syspred.xml (Delete lines X86 and add setting pass specialize : <copyprofile> + <DoNotCleanTaskBar> + <DesktopBackground>)

    6) Are you using an original untouched DVD (or USB made form such DVD) to install Windows?
    => I Use Original/true DVD Windows 8.1 64 by Microsoft (I use Home version)

    7) Have you disabled SecureBoot ?
    => I can't activate (GOP can't activate bios With AMD R9 graphics cards + Core I5 4670 + motherboard MSI H87)

    I test version 1.3.15 vs 1.3.16 : All is ok but no WinRE (computer reboot but no into the recovery environment)


    1.3.15 install with REAGENTC / DISABLE

    1.3.16 install with Install - Windows 8.1
    In "Boot" folder, I copy the same files but from DVD Windows 8.1.

    (I test with original DVD Windows 8 x64 perfect ! and I' wil test with windows 7 next week)

    Could you help me with Windows 8.1 please? :confused:
     
  3. samfrench

    samfrench MDL Novice

    Dec 7, 2013
    2
    0
    0
    With the new script (wim first and test Wim last) windows 8.1_install

    REAGENTC failure of the operation Error 4c7
    REAGENTC.EXE
     
  4. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2524 AnarethoS, Dec 9, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I have made some correction to the Windows 8.1 installation script (try #2)

    The new script should help fix the following :
    - Recovery Environment not activated after capture

    Modification made :
    - Sysprep BEFORE working with WinRE.Wim file. Sysprep disable by itself the Recovevy Environment, so no need to use REAGENTC

    Tested and working on :
    - Windows 8.1 - 32bits - MBR/BIOS - VmWare

    Install - Windows 8.1.cmd for WIM on last partition
    Code:
    @Echo Off
    IF NOT EXIST "%CD%\CaptureImage\Capture\SettingsRE.txt" EXIT
    IF NOT EXIST "%CD%\SettingsRE.txt" EXIT
    IF NOT EXIST "%CD%\RecoveryFiles\ResetConfig.xml" EXIT
    IF NOT EXIST "%CD%\RecoveryFiles\ResetPartitions.txt" EXIT
    IF NOT EXIST "%CD%\Sysprep.xml" EXIT
    IF NOT EXIST C:\Windows\System32\Sysprep\Sysprep.exe EXIT
    
    CLS
    TITLE Capture Windows 8 Image
    TASKKILL /IM SYSPREP.EXE /F
    
    
    ECHO ==============================================
    ECHO Loading Settings
    ECHO ==============================================
    FOR /F "delims=; tokens=1" %%I in (SettingsRE.txt) DO SET %%I
    
    
    ECHO ==============================================
    ECHO Creating recovery partition / resize
    ECHO ==============================================
    ECHO SELECT DISK %DISKID% >C:\Hdd.txt
    ECHO SELECT PARTITION %WINDOWSPART% >>C:\Hdd.txt
    ECHO SHRINK MINIMUM=%IMAGESIZE% DESIRED=%IMAGESIZE% >>C:\Hdd.txt
    ECHO CREATE PARTITION PRIMARY >>C:\Hdd.txt
    ECHO SELECT PARTITION %IMAGEPART% >>C:\Hdd.txt
    ECHO FORMAT FS=NTFS QUICK LABEL=RECIMAGE >>C:\Hdd.txt
    ECHO SELECT PARTITION %IMAGEPART% >>C:\Hdd.txt
    ECHO SET ID=27 NOERR >>C:\Hdd.txt
    ECHO SELECT PARTITION %IMAGEPART% >>C:\Hdd.txt
    ECHO SET ID="de94bba4-06d1-4d40-a16a-bfd50179d6ac" NOERR >>C:\Hdd.txt
    DISKPART /S C:\Hdd.txt
    DEL C:\Hdd.txt
    
    
    ECHO ==============================================
    ECHO MOUNTING RECOVERY PARTITION
    ECHO ==============================================
    ECHO SELECT DISK %DISKID% >C:\Hdd.txt
    ECHO SELECT PARTITION %RECOVERYPART% >>C:\Hdd.txt
    ECHO ASSIGN LETTER=%RECOVERYLETTER% >>C:\Hdd.txt
    ECHO SELECT PARTITION %IMAGEPART% >>C:\Hdd.txt
    ECHO ASSIGN LETTER=%IMAGELETTER% >>C:\Hdd.txt
    DISKPART /S C:\Hdd.txt
    DEL C:\Hdd.txt
    IF NOT EXIST %RECOVERYLETTER%:\ GOTO ERRORNOREC
    IF NOT EXIST %IMAGELETTER%:\ GOTO ERRORNOREC
    
    
    ECHO ==============================================
    ECHO SYSPREPING THE COMPUTER
    ECHO ==============================================
    XCOPY .\Files\*.* /SEVHKY C:\
    START /WAIT C:\Windows\System32\Sysprep\SysPrep.exe /generalize /oobe /quit /unattend:SysPrep.Xml
    START /WAIT CreateShortcut "C:\Windows\System32\RecoveryTools\Recovery%PROCESSOR_ARCHITECTURE%.EXE" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Recovery Tools.lnk"
    
    
    ECHO ==============================================
    ECHO BACKUP ORIGINAL WINDOWSRE
    ECHO ==============================================
    ATTRIB -S -R -H C:\Windows\System32\Recovery\*.* /S
    IF NOT EXIST C:\Windows\System32\Recovery\Winre.Wim GOTO ERRORNOWINRE
    IF NOT EXIST C:\Windows\System32\Recovery\Backup MD C:\Windows\System32\Recovery\Backup
    IF NOT EXIST C:\Windows\System32\Recovery\Backup\ReAgent.xml COPY C:\Windows\System32\Recovery\ReAgent.xml C:\Windows\System32\Recovery\Backup\ReAgent.xml
    IF NOT EXIST C:\Windows\System32\Recovery\Backup\WinRE.Wim COPY C:\Windows\System32\Recovery\WinRE.Wim C:\Windows\System32\Recovery\Backup\WinRE.Wim
    
    
    ECHO ==============================================
    ECHO COPYING WINDOWSRE
    ECHO ==============================================
    MD %RECOVERYLETTER%:\Capture
    MD %RECOVERYLETTER%:\Recovery\WindowsRE
    MD %IMAGELETTER%:\RecoveryImage
    COPY C:\Windows\System32\Recovery\WinRE.Wim %RECOVERYLETTER%:\Recovery\WindowsRE\WinRE.Wim
    COPY C:\Windows\System32\Recovery\WinRE.Wim %RECOVERYLETTER%:\Capture\WinRE.Wim
    COPY C:\Windows\Boot\DVD\PCAT\Boot.Sdi %RECOVERYLETTER%:\Recovery\WindowsRE\Boot.Sdi
    COPY C:\Windows\Boot\DVD\PCAT\Boot.Sdi %RECOVERYLETTER%:\Capture\Boot.Sdi
    COPY ".\RecoveryFiles\*.*" %IMAGELETTER%:\RecoveryImage
    
    
    ECHO ==============================================
    ECHO Configuring FirstLogon.cmd
    ECHO ==============================================
    MD C:\Windows\Setup\Scripts
    ECHO SELECT DISK %DISKID% >C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO SELECT PARTITION %RECOVERYPART% >>C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO REMOVE >>C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO SELECT PARTITION %IMAGEPART% >>C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO REMOVE >>C:\Windows\Setup\Scripts\Hdd.Txt
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO DISKPART /S C:\Windows\Setup\Scripts\Hdd.Txt >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO DISKPART /S C:\Windows\Setup\Scripts\Hdd.Txt >C:\Windows\Setup\Scripts\FirstLogon.cmd
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO ReAgentc.exe /Enable >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO ReAgentc.exe /Enable >C:\Windows\Setup\Scripts\FirstLogon.cmd
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO ReAgentc.exe /SetBootShellLink /ConfigFile C:\Windows\System32\RecoveryTools\WinRE.xml >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO ReAgentc.exe /SetBootShellLink /ConfigFile C:\Windows\System32\RecoveryTools\WinRE.xml >C:\Windows\Setup\Scripts\FirstLogon.cmd
    
    
    
    ECHO ==============================================
    ECHO MODIFYING CAPTURE IMAGE
    ECHO ==============================================
    MD %TMP%\WinRE
    DISM /Mount-Wim /Index:1 /WimFile:%RECOVERYLETTER%:\Capture\WinRE.Wim /MountDir:%TMP%\WinRE
    ATTRIB -S -R -H %TMP%\WinRE\Windows\System32\WINPESHL.INI
    DEL %TMP%\WinRE\Windows\System32\WINPESHL.INI
    XCOPY /SEVHKY .\CaptureImage\*.* %TMP%\WinRE\
    DISM /UnMount-Wim /MountDir:%TMP%\WinRE /commit
    
    
    ECHO ==============================================
    ECHO MODIFYING RECOVERY TOOLS
    ECHO ==============================================
    MD %TMP%\WinRE
    DISM /Mount-Wim /Index:1 /WimFile:%RECOVERYLETTER%:\Recovery\WindowsRE\WinRE.Wim /MountDir:%TMP%\WinRE
    XCOPY /SEVHKY .\WinRE%PROCESSOR_ARCHITECTURE%\*.* %TMP%\WinRE\
    DISM /UnMount-Wim /MountDir:%TMP%\WinRE /commit
    
    
    ECHO ==============================================
    ECHO ADDING CAPTURE IMAGE
    ECHO ==============================================
    FOR /F "delims={} tokens=2" %%I IN ('BCDEDIT.EXE /create /application OSLOADER /d Capture') DO SET OSGUID=%%I
    FOR /F "delims={} tokens=2" %%I IN ('BCDEDIT.EXE /create /device /d Capture') DO SET RAMGUID=%%I
    SET OSGUID={%OSGUID%}
    SET RAMGUID={%RAMGUID%}
    bcdedit /set %OSGUID% device ramdisk=[%RECOVERYLETTER%:]\Capture\WinRe.Wim,%RAMGUID%
    bcdedit /set %OSGUID% osdevice ramdisk=[%RECOVERYLETTER%:]\Capture\WinRe.Wim,%RAMGUID%
    bcdedit /set %OSGUID% path \windows\system32\boot\%WINLOAD%
    bcdedit /set %OSGUID% locale %LANG%
    bcdedit /set %OSGUID% inherit {bootloadersettings}
    bcdedit /set %OSGUID% systemroot \windows
    bcdedit /set %OSGUID% detecthal Yes
    bcdedit /set %OSGUID% winpe Yes
    bcdedit /set %OSGUID% ems No
    bcdedit /set %RAMGUID% ramdisksdidevice partition=%RECOVERYLETTER%:
    bcdedit /set %RAMGUID% ramdisksdipath \Capture\BOOT.SDI
    bcdedit /set {bootmgr} displayorder %OSGUID% /addlast
    bcdedit /set {bootmgr} locale %LANG%
    bcdedit /set {current} locale %LANG%
    bcdedit /delete {current}
    
    
    ECHO ==============================================
    ECHO Rebooting the computer
    ECHO ==============================================
    SHUTDOWN -R -F -T 15
    GOTO QUIT
    
    :ERRORNOREC
    CLS
    ECHO *******************************************
    ECHO Recovery partition not found.
    ECHO *******************************************
    ECHO Please check settings and try again.
    ECHO *******************************************
    PAUSE
    GOTO QUIT
    
    
    :ERRORNOWINRE
    CLS
    ECHO *******************************************
    ECHO WinRE.Wim not found.
    ECHO *******************************************
    ECHO Please install this software only on 
    ECHO computer where the AutoUnattend.XMl was
    ECHO used during the installation process.
    ECHO Manually switching to AUDIT mode during
    ECHO OOBE process is not supported under
    ECHO Windows 8.
    ECHO *******************************************
    PAUSE
    GOTO QUIT
    
    
    :QUIT
    

    Install - Windows 8.1.cmd for WIM on first partition
    Code:
    @Echo Off
    IF NOT EXIST "%CD%\CaptureImage\Capture\SettingsRE.txt" EXIT
    IF NOT EXIST "%CD%\SettingsRE.txt" EXIT
    IF NOT EXIST "%CD%\RecoveryFiles\ResetConfig.xml" EXIT
    IF NOT EXIST "%CD%\RecoveryFiles\ResetPartitions.txt" EXIT
    IF NOT EXIST "%CD%\Sysprep.xml" EXIT
    IF NOT EXIST C:\Windows\System32\Sysprep\Sysprep.exe EXIT
    
    CLS
    TITLE Capture Windows 8 Image
    TASKKILL /IM SYSPREP.EXE /F
    
    ECHO ==============================================
    ECHO Loading Settings
    ECHO ==============================================
    FOR /F "delims=; tokens=1" %%I in (SettingsRE.txt) DO SET %%I
    
    
    ECHO ==============================================
    ECHO MOUNTING RECOVERY PARTITION
    ECHO ==============================================
    ECHO SELECT DISK %DISKID% >C:\Hdd.txt
    ECHO SELECT PARTITION %RECOVERYPART% >>C:\Hdd.txt
    ECHO ASSIGN LETTER=%RECOVERYLETTER% >>C:\Hdd.txt
    DISKPART /S C:\Hdd.txt
    DEL C:\Hdd.txt
    IF NOT EXIST %RECOVERYLETTER%:\ GOTO ERRORNOREC
    
    
    ECHO ==============================================
    ECHO SYSPREPING THE COMPUTER
    ECHO ==============================================
    XCOPY .\Files\*.* /SEVHKY C:\
    START /WAIT C:\Windows\System32\Sysprep\SysPrep.exe /generalize /oobe /quit /unattend:SysPrep.Xml
    START /WAIT CreateShortcut "C:\Windows\System32\RecoveryTools\Recovery%PROCESSOR_ARCHITECTURE%.EXE" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Recovery Tools.lnk"
    
    
    ECHO ==============================================
    ECHO BACKUP ORIGINAL WINDOWSRE
    ECHO ==============================================
    ATTRIB -S -R -H C:\Windows\System32\Recovery\*.* /S
    IF NOT EXIST C:\Windows\System32\Recovery\Winre.Wim GOTO ERRORNOWINRE
    IF NOT EXIST C:\Windows\System32\Recovery\Backup MD C:\Windows\System32\Recovery\Backup
    IF NOT EXIST C:\Windows\System32\Recovery\Backup\ReAgent.xml COPY C:\Windows\System32\Recovery\ReAgent.xml C:\Windows\System32\Recovery\Backup\ReAgent.xml
    IF NOT EXIST C:\Windows\System32\Recovery\Backup\WinRE.Wim COPY C:\Windows\System32\Recovery\WinRE.Wim C:\Windows\System32\Recovery\Backup\WinRE.Wim
    
    
    ECHO ==============================================
    ECHO COPYING WINDOWSRE
    ECHO ==============================================
    MD %RECOVERYLETTER%:\Capture
    MD %RECOVERYLETTER%:\Recovery\WindowsRE
    MD %RECOVERYLETTER%:\RecoveryImage
    COPY C:\Windows\System32\Recovery\WinRE.Wim %RECOVERYLETTER%:\Recovery\WindowsRE\WinRE.Wim
    COPY C:\Windows\System32\Recovery\WinRE.Wim %RECOVERYLETTER%:\Capture\WinRE.Wim
    COPY C:\Windows\Boot\DVD\PCAT\Boot.Sdi %RECOVERYLETTER%:\Recovery\WindowsRE\Boot.Sdi
    COPY C:\Windows\Boot\DVD\PCAT\Boot.Sdi %RECOVERYLETTER%:\Capture\Boot.Sdi
    COPY ".\RecoveryFiles\*.*" %RECOVERYLETTER%:\RecoveryImage
    
    
    ECHO ==============================================
    ECHO Configuring FirstLogon.cmd
    ECHO ==============================================
    MD C:\Windows\Setup\Scripts
    ECHO SELECT DISK %DISKID% >C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO SELECT PARTITION %RECOVERYPART% >>C:\Windows\Setup\Scripts\Hdd.Txt
    ECHO REMOVE >>C:\Windows\Setup\Scripts\Hdd.Txt
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO DISKPART /S C:\Windows\Setup\Scripts\Hdd.Txt >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO DISKPART /S C:\Windows\Setup\Scripts\Hdd.Txt >C:\Windows\Setup\Scripts\FirstLogon.cmd
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO ReAgenTC.exe /Enable >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO ReAgenTC.exe /Enable >C:\Windows\Setup\Scripts\FirstLogon.cmd
    IF EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd (
    REN C:\Windows\Setup\Scripts\FirstLogon.cmd FirstLogon.Sav
    ECHO ReAgentc.exe /SetBootShellLink /ConfigFile C:\Windows\System32\RecoveryTools\WinRE.xml >C:\Windows\Setup\Scripts\FirstLogon.cmd
    TYPE C:\Windows\Setup\Scripts\FirstLogon.Sav >> C:\Windows\Setup\Scripts\FirstLogon.cmd 
    DEL C:\Windows\Setup\Scripts\FirstLogon.Sav)
    IF NOT EXIST C:\Windows\Setup\Scripts\FirstLogon.cmd ECHO ReAgentc.exe /SetBootShellLink /ConfigFile C:\Windows\System32\RecoveryTools\WinRE.xml >C:\Windows\Setup\Scripts\FirstLogon.cmd
    
    
    ECHO ==============================================
    ECHO MODIFYING CAPTURE IMAGE
    ECHO ==============================================
    MD %TMP%\WinRE
    DISM /Mount-Wim /Index:1 /WimFile:%RECOVERYLETTER%:\Capture\WinRE.Wim /MountDir:%TMP%\WinRE
    ATTRIB -S -R -H %TMP%\WinRE\Windows\System32\WINPESHL.INI
    DEL %TMP%\WinRE\Windows\System32\WINPESHL.INI
    XCOPY /SEVHKY .\CaptureImage\*.* %TMP%\WinRE\
    DISM /UnMount-Wim /MountDir:%TMP%\WinRE /commit
    
    
    ECHO ==============================================
    ECHO MODIFYING RECOVERY TOOLS
    ECHO ==============================================
    MD %TMP%\WinRE
    DISM /Mount-Wim /Index:1 /WimFile:%RECOVERYLETTER%:\Recovery\WindowsRE\WinRE.Wim /MountDir:%TMP%\WinRE
    XCOPY /SEVHKY .\WinRE%PROCESSOR_ARCHITECTURE%\*.* %TMP%\WinRE\
    DISM /UnMount-Wim /MountDir:%TMP%\WinRE /commit
    
    
    ECHO ==============================================
    ECHO ADDING CAPTURE IMAGE
    ECHO ==============================================
    FOR /F "delims={} tokens=2" %%I IN ('BCDEDIT.EXE /create /application OSLOADER /d Capture') DO SET OSGUID=%%I
    FOR /F "delims={} tokens=2" %%I IN ('BCDEDIT.EXE /create /device /d Capture') DO SET RAMGUID=%%I
    SET OSGUID={%OSGUID%}
    SET RAMGUID={%RAMGUID%}
    bcdedit /set %OSGUID% device ramdisk=[%RECOVERYLETTER%:]\Capture\WinRe.Wim,%RAMGUID%
    bcdedit /set %OSGUID% osdevice ramdisk=[%RECOVERYLETTER%:]\Capture\WinRe.Wim,%RAMGUID%
    bcdedit /set %OSGUID% path \windows\system32\boot\%WINLOAD%
    bcdedit /set %OSGUID% locale %LANG%
    bcdedit /set %OSGUID% inherit {bootloadersettings}
    bcdedit /set %OSGUID% systemroot \windows
    bcdedit /set %OSGUID% detecthal Yes
    bcdedit /set %OSGUID% winpe Yes
    bcdedit /set %OSGUID% ems No
    bcdedit /set %RAMGUID% ramdisksdidevice partition=%RECOVERYLETTER%:
    bcdedit /set %RAMGUID% ramdisksdipath \Capture\BOOT.SDI
    bcdedit /set {bootmgr} displayorder %OSGUID% /addlast
    bcdedit /set {bootmgr} locale %LANG%
    bcdedit /set {current} locale %LANG%
    bcdedit /delete {current}
    
    
    ECHO ==============================================
    ECHO Rebooting the computer
    ECHO ==============================================
    SHUTDOWN -R -F -T 15
    GOTO QUIT
    
    :ERRORNOREC
    CLS
    ECHO *******************************************
    ECHO Recovery partition not found.
    ECHO *******************************************
    ECHO Please check settings and try again.
    ECHO *******************************************
    PAUSE
    GOTO QUIT
    
    
    :ERRORNOWINRE
    CLS
    ECHO *******************************************
    ECHO WinRE.Wim not found.
    ECHO *******************************************
    ECHO Please install this software only on 
    ECHO computer where the AutoUnattend.XMl was
    ECHO used during the installation process.
    ECHO Manually switching to AUDIT mode during
    ECHO OOBE process is not supported under
    ECHO Windows 8.
    ECHO *******************************************
    PAUSE
    GOTO QUIT
    
    
    :QUIT
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. patris971

    patris971 MDL Novice

    Dec 8, 2012
    27
    6
    0
    hello Anarethos


    I tried the last update that you post ( Install - Windows 8.1.cmd for WIM on first partition) in Windows 8.1 - 32bit - MBR / BIOS on laptop but the condition of the WinRE is always deactivated for me
    Here are my donated REAgentC / info:


    Microsoft Windows [Version 6.3.9600 ]
    ( c) 2013 Microsoft Corporation. All rights reserved.


    C: \ Windows \ system32 > REAgentC / info
    Information on configuring the Recovery Environment
    Windows ( WinRE ) and reboot the system :


    WinRE State : Disabled
    Location WinRE :
    Identifier data boot configuration (BCD) : 00000000-00
    00-0000-0000-000000000000
    Location of the recovery image : \ \ \ GLOBALROOT \ device \ harddisk0 \ par ?
    tition1 \ RecoveryImage
    Index recovery image : 1
    Location of the custom image :
    Index personalized picture: 0


    REAgentC.exe : successful operation.


    C: \ Windows \ system32 >




    Comand prompt that appears just before the desktop appears , telling me that "Windows RE must be installed on a single volume formatted with the NTFS file system while it is in NTFS ...


    View attachment 25820
     
  6. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2526 AnarethoS, Dec 10, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    @patris971

    1) Just to be sure, you took the latest downloadable version and replaced the content of the CMD with the content from my previous post? I didn't not updated the downloadable source.

    2) If you updated manually the file and it still didn't work, I would like you to try installation without using the AutoUnattend.xml file, but rather do it by hand. Do to so, do the following :

    a) Launch Windows 8.1 installation from CD or DVD
    b) When you are prompted to install Windows, press SHIFT+F10 to open a command promt.
    c) Type the following (this is for MBR/BIOS - Wim on last partition)
    Code:
    DISKPART
    SELECT DISK 0
    CLEAN
    CREATE PARTITION PRIMARY SIZE=1000
    FORMAT FS=NTFS QUICK LABEL=RECOVERY
    SET ID=27
    CREATE PARTITION PRIMARY SIZE=500
    FORMAT FS=NTFS QUICK LABEL=SYSTEM
    ACTIVE
    CREATE PARTITION PRIMARY
    FORMAT FS=NTFS QUICK LABEL=WINDOWS
    EXIT
    EXIT
    
    d) Install Windows on the "Windows" partition (number 3)
    e) When Windows is installed and is in the OOBE screen (where it ask you to configure the computer), press CTRL+SHIFT+F3 to switch to AUDIT mode

    From now, continue as normal

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. patris971

    patris971 MDL Novice

    Dec 8, 2012
    27
    6
    0
    to:
    for MBR / BIOS - Wim on the first partition)
    1) yes I had downloaded the latest version and replace the CMD file ...
    2) I just did not use the AutoUnattend.xm file for the installation, everything is handmade and WinRE always off ...

    to:
    MBR / BIOS - Wim on the last partition)
    WinRE enabled ---> ok for me

    Thanks
     
  8. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Oh! So the problem is with the WIM on the first partition only?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    on December 2, I installed windows 8.1 in uefi, gpt, with alpha, 1.3.16 last partition. asus pc with cpu amd a10 uefi bios
    partition recovery installation ok, I did all the tests all ok except the recovery with DVDs created by recovery tools.
    the recovery tools has created 2 DVDs I burning and I tried to make the recovry but during recovery to the second dvd freezes and does not continue asking an additional dvd, help
    everything is ok except the recovery disk 1 and disk 2, error on disk 2
    :worthy:help
     
  10. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    luxcer from what I have read you said it didnt create a third iso, right? Just two iso's and empty txt file? Was there any error while creating the iso's? Not talking about installing it from dvds but did it say anything about error while make the iso's or did it just end? Did it say "Creating DVD 3 ISO File"? I know the error arises when installing from the dvds but there seems to be an issue with the creation of the iso themselves.
     
  11. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    create iso and 2 an empty txt file with create outcome ok from the recovery tools.
    I did test to reset pc from 2 iso.
    dvd1 ok then inserted the dvd 2 after twenty minutes always asks another dvd, and not process progresses, I think an error in dvd 2.
    too bad because then the rest is all perfect
     
  12. patris971

    patris971 MDL Novice

    Dec 8, 2012
    27
    6
    0
    to:
    MBR / BIOS - Wim on the last partition) x86


    restoring the iso from the disk 1 and disk2 worked for me...
     
  13. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    i used : uefi bios, partition gpt, on the last partition win 8.1 pro x 64 original
     
  14. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    #2534 Flipp3r, Dec 11, 2013
    Last edited by a moderator: Apr 20, 2017
    Hey guys, Windows 8.1 already ships with a utility to create a backup of your Recovery to USB. Much better/fatser than dvd.
    Code:
    C:\Windows\System32\RecoveryDrive.exe
    Once you've created a usb backup of the recovery, it gives you an option to remove recovery from your hdd.
    This is great if you have a small ssd...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I already knew about that but its not in win 7 or win 8....not everyone is running win 8.1. Remember some oem manufactures like HP lock the boot and recovery so that might be challenging for ppl that havent had experience in removing the locks.

    Little off topic but I have noticed with the push of touch screens oem manufactures now put in low end cpu's (celerons and pentium 4, not even dual cores), smaller ssd/hdd and lower ram...to me its not worth just having a touch screen. I want the power. lol Now with that said the dell allienware looks pretty cool but its a allienware.
     
  16. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    Just thought I'd mention the tool as Luxcer & others are currently playing with 8.1.
    Perhaps for 8.1 Anarethos can create a shortcut to the MS tool instead...

    As for the notebooks, I don't know anything about "lock's" but we are talking about a clean new install with recovery.
    I know the current MSI notebooks come with their own custom tool that creates backup to DVD, USB or ISO for later use.

    Reminds me, I was impressed by the MSI recovery tool.
    I friend bought a notebook with HDD only & wanted me to re-install the OS onto a new SSD and move his HDD as a Data drive.
    I created a backup onto USB. Moved the HDD to secondary channel & installed the SSD in Primary.
    Booted the USB Recovery backup & restored.
    The MSI tool restored the OS onto the SSD and automatically saved the recovery image onto the HDD, leaving the SSD free'd up...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    That is cool about the MSI tool. I will look into that...sounds interesting. Thanks for that info.
     
  18. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Under Windows 8/8.1, my Tools already call the built-in Windows Tools to create the USB recovery drive. Since DVD was not a built-in option, I had to build one by myself. For Windows 7, I had to build both.

    Still, for the USB recovery key Creator to works, you still need a recovery partition created with my Tools or by hand.

    I am currently reinstalling Windows 8.1 to thet the WIM on first partition since it seems so of you have problem with WinRE. As per M$ paper, this solution should not be used, so maybe they made it stoppe working from Windows 8 to Windows 8.1. If I am unable to make it works, I may keep the WIM on firt partition for Windows 7 and WIM on last for Windows 8/8.1 only.

    I will let you know. One this will be tested, I will check for the DVD problem.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. robex

    robex MDL Novice

    Jul 29, 2009
    6
    0
    0
    #2539 robex, Dec 12, 2013
    Last edited by a moderator: Apr 20, 2017
  20. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    Another one with recovery on first partition...this is what AnarethoS is working on now...read above your post. Win 8/8.1 doesnt like recovery on first partition so he is doing a lot of testing to see if it is even possible to have the recovery on the first partition. The last partition for recovery works but not first. I have even been reading about this on Micro's site also. We should hear from AnarethoS soon. If nothing else use the last partition for recovery instead of the first. Hope this helps you some.