OEM Recovery Partition Creator for Windows

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

  1. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,591
    1,587
    150
    Of course he can and will, he will let us translate:)
    I have translated it into swedish just to see how it would work..
     
  2. gamepoint

    gamepoint MDL Senior Member

    Jan 4, 2010
    456
    59
    10
    lo0king forward to it
     
  3. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,591
    1,587
    150
    Im sure you can translate it to your language to see how it works, he wont add it until its fully working of course:)
     
  4. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Hi
    After a good night sleep i desided to try again.
    I inserted disk 1 and in recovery tool i went into Tools/cmd promt/Diskpart/select disk 0/clean/exit/exit and then went to "Reinstall Windows"
    The proces started and when disk 3 finnished the error message popped up again.
    Ignored it and went to the "Boot sector repair - MBR"
    (do`nt know if i had to do that)
    And voila this time it worked and i booted in Windows
    There (in AUDIT mode) i tryed to open cmd/Diskpart/select Disk 0 to make a new (DATA) partition.
    I tryed both Primary,Extended and Logical but it refused to do that.
    Rebooted in to Acronis Diskdirector Suite and made the partition.
    First reboot failed
    Then i had to use the F8 option and go to the recovery tool and do the "Boot sector repair - MBR"
    Rebooted into Windows now with the new DATA partition.
    changed the assign letter so that D: DATA insted of H.
    (that`s just cosmetic)
    Later today i`ll try the script AnatheroS made.
    :biggrin:
    Update
    Unfortunatly that script did`nt work
    :(
     
  5. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Do you know anything about script language ?
    To me i`ts Chinese.
    If you do
    would you take a look at that script code Anatheros posted on page 28.
    and se if you can find a wrong command or whatever.
    THX
    :rolleyes:
     
  6. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    i found a very easy solution to resize the windows partition and create a new in AUDIT mode
    without using Diskpart.
    Navigate to Controllpanel/Computeradministration/diskmanegement (i think it`s called in English)
    Right click on the Windows partition an resize and after that rightclick on the unallocated part. and create a new.
    But i guess that most of you already knew that'
    :wiggle:
     
  7. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,591
    1,587
    150
    My scriptingskills isnt that good and no its not chinese. My gf is from taiwan and this makes alot more sense then she does when she's speaking chinese lol.
     
  8. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Then ask her to do it.
    Can`t wait to se what will happen when i execute the result of her work
    :hypo:
     
  9. ambidav

    ambidav MDL Guru

    May 14, 2008
    2,501
    5,675
    90
    @AnarethoS does the recovery partition have to be 12000=12GB?
    Just that my backup is about half that size! 6GB! :)
     
  10. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #293 AnarethoS, Oct 16, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Yep, There is a problem with my script.
    And an stupid error btw. Forgot a space somewhere.
    Here is the new version.

    Code:
    @Echo Off
    CLS
    ECHO ********************************************
    ECHO This script allow the OffLine modification of SETTINGS.INI stored in the Recovery Environment. You need administrator rights to use this software. Press any key to continue or CTRL+C to quit.
    ECHO ********************************************
    PAUSE
    CLS
    SET DISK=-1
    SET RECOVERYPARTITION=-1
    SET LETTER=-1
    CLS
    ECHO ********************************************
    ECHO Reading SETTINGS.INI FILE
    ECHO ********************************************
    FOR /F "tokens=1,2 delims==" %%I in ('type "%PROGRAMFILES%\RecoveryCreator\Settings.ini"') DO ( IF "%%I"=="DiskID" SET DISK=%%J
    IF "%%I"=="RecoveryPartitionID" SET RECOVERYPARTITION=%%J
    IF "%%I"=="RecoveryLetter" SET LETTER=%%J)
    IF "%DISK%"=="-1" GOTO ERROR
    IF "%RECOVERYPARTITION%"=="-1" GOTO ERROR
    IF "%LETTER%"=="-1" GOTO ERROR
    ECHO ********************************************
    ECHO Disk ID : %DISK%
    ECHO Recovery Partition : %RECOVERYPARTITION%
    ECHO Recovery Letter : %LETTER%
    ECHO ********************************************
    ECHO Mounting Recovery Partition
    ECHO ********************************************
    ECHO Select Disk %DISK% >"%TMP%\Mount.txt"
    ECHO Select Partition %RECOVERYPARTITION% >>"%TMP%\Mount.Txt"
    ECHO Assign letter %LETTER% >>"%TMP%\Mount.Txt"
    Diskpart /s "%TMP%\Mount.Txt"
    IF NOT EXIST %LETTER% GOTO ERROR
    ECHO ********************************************
    ECHO Mounting WINPE.WIM file
    ECHO ********************************************
    RD /S /Q "%TMP%\MOUNT"
    MD "%TMP%\MOUNT"
    DISM /Mount-Wim /WimFile:%LETTER%\WINPE\WINPE.WIM /MountDir:"%TMP%\Mount" /Index:1
    IF NOT Exist "%TMP%\Mount\Windows" GOTO ERROR
    ECHO ********************************************
    ECHO Notepad will open to allow you to modify the SETTINGS.INI file. Once completed, simply save your change and close notepad.
    ECHO ********************************************
    PAUSE
    IF NOT Exist "%TMP%\Mount\Recovery\Settings.ini" GOTO ERROR
    ATTRIB -S -R -H "%TMP%\Mount\Recovery\Settings.ini"
    ATTRIB -S -R -H "%PROGRAMFILES%\RecoveryCreator\Settings.ini"
    START /WAIT NOTEPAD.EXE "%TMP%\Mount\Recovery\Settings.ini"
    DEL "%PROGRAMFILES%\RecoveryCreator\Settings.ini"
    COPY "%TMP%\Mount\Recovery\Settings.ini" "%PROGRAMFILES%\RecoveryCreator\Settings.ini"
    FC "%PROGRAMFILES%\RecoveryCreator\Settings.ini" "%TMP%\Mount\Recovery\Settings.ini"
    IF "%ERRORLEVEL%"=="1" GOTO ERROR
    ECHO ********************************************
    ECHO UnMounting WINRE image
    ECHO ********************************************
    DISM /UnMount-Wim /MountDir:"%TMP%\Mount" /Commit
    PAUSE
    GOTO QUIT
    
    :ERROR
    ECHO.
    ECHO.
    ECHO An error occured!
    PAUSE
    GOTO QUIT
    
    :QUIT
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Also, when using the Generic image option, it gave out an error when restoring even if everything was fine.
    Will be fixed in next release.
    :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    you can make it smaller. Juste found that 12gb was a good size with today HDD and the fact that some people, like me, install Office 2010 Plus and many opther software, making the image arount 9gb :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    I think that you can change the size of it
    But then you have to edit the settings.ine file in the Recovery Tools folder
    (C:\Programfiles (x86) )
    In the beginning of that ini file you`ll se this:

    [Settings]
    Languages=2
    DebugLevel=0
    DiskID=0
    WipeUSBDVD=1
    RecoveryPartitionID=1
    RecoveryLetter=R:
    RecoveryLabel=RECOVERY
    BootPartitionID=2
    BootLetter=S:
    BootLabel=SYSTEM
    WindowsPartitionID=3
    WindowsLetter=W:
    WindowsLabel=WINDOWS
    Partition1Size=12000
    Partition1Type=27
    Partition1Label=RECOVERY
    Partition2Size=300
    Partition2Type=07
    Partition2Label=SYSTEM
    Partition3Type=07
    Partition3Label=WINDOWS

    Just change Partition1Size=12000 to whatever you decided when running the Diskpart operation before you install Windows 7
    That should be it.
    But only 99% shure
    :rolleyes:
     
  14. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    #297 Per Henrik Rasmussen, Oct 16, 2010
    Last edited by a moderator: Apr 20, 2017
    Thanks
    Will test ASAP
    and post result
     
  15. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    I should be able to post BETA 10 before Monday.
    Until now, here is the list of what would be fixed in next version.

    2.0.0 – Beta 10
    •Added a script named “OffLine Settings Update.cmd” in the “RecoveryCreator” folder that allows to changes the SETTINGS.INI file stored inside the RecoveryEnvironment. This can be useful with “Generic” image if you need to change partition configuration.
    •Better error handling with capture/reinstall/repair script
    •Better space optimization when capturing, reducing the numbers of required DVD when burning
    •Added an option to burn on dual-layer DVD.
    •Restoring from a generic image was giving an error even if everything was OK. Now fixed.
    •When restoring from DVD and putting DVD in the wrong order, the process may think that all files where copied while it was not, generating an error. Now fixed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Thx
    I think that my answer to ambidav in post #299 only is an issue if you choose the Generic Image option.
    Right ?
     
  17. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    If you want to change teh recovery partition change BEFORE installing Windows, simply put the size you want using diskpart before installing W7 and change parameters in SETTINGS.INI before installing the recovery tools.

    So, yes, you where right, but this works also with non-generic image, as when restoring from DVD/USB, it is the size specified there that is used to create the recovery partition.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...