OEM Recovery Partition Creator for Windows

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

  1. NisseHult

    NisseHult MDL Novice

    May 24, 2010
    25
    0
    0
    Thanks alot for the infromation :)

    Can i fix partitons and install your tool now, or must i do a new installation of windows?
    Kind Regards
    NisseHult.
     
  2. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    AUTOIT is a scripting language similar to basic. I love it due to the fact it is really simple to use, it's free, can compile into 32 and 64 EXE files AND the EXE file does not need any special DLL to works on a computer.

    Since my software is based on a old one I made, it is a mix of AutoIT and CMD scripts. Also, some things are easier to do with CMD file (like grabbing the output of BCDEDIT when adding a new entry to the boot manager).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #263 AnarethoS, Oct 15, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Well, this tools works better with a brand-new installation of WINDOWS without your personal file, since it is more a software to restore a basic image that a full backup.

    How many partitions do you have on your computer? 2 or 3 ? In which order?
    To let me know, please do the following.

    Open Command Prompt as adminsitrator and type the following (press enter after each line)
    Code:
    diskpart
    select disk 0
    list partition
    
    
    Copy here the result seen on screen. I will let you know what you can do.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Ok
    Would i be hard to make an "Advanced User" tab
    in your tool where you can (via a script or whateever) mount the WINPE.WIM and change that vallue automaticly and also change it in the recovery tool in programfiles ?
    :rolleyes:
     
  5. gamepoint

    gamepoint MDL Senior Member

    Jan 4, 2010
    456
    59
    10
    what if i want to make a translation for this program (malay language)? i want to contribute somehow...:eek:
     
  6. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Well, Maybe not adding a option in the GUI, but I may be able to create a Script file that can mount everything, open notepad and, when completed, update all settings and commit the image.

    Will check that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Take a look of the SETTINGS.INI file and the documentation. Instruction on how to translate is there.

    Until final release, I will not add any language on my side.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Thanks
    It would be a very nice option especialy when using the generic disks on other machines and want to ad partition(s)
    And just one more idea to make it foolproof.
    It should check if any changes is made to the partition layout and if not
    nothing will be changed.
     
  9. NisseHult

    NisseHult MDL Novice

    May 24, 2010
    25
    0
    0
    #269 NisseHult, Oct 15, 2010
    Last edited by a moderator: Apr 20, 2017
    DISKPART> list partition

    Partitionsnr Typ Storlek Start
    ------------- ---------------- ------- -------
    Partitionsnr 1 Primär 100 M 1024 K
    Partitionsnr 2 Primär 102 G 101 M
    Partitionsnr 3 Primär 195 G 102 G
     
  10. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Ok, so you already have 3 partition.
    Partition 1 : Boot partition (aka SYSTEM partition) : 100mb
    Partition 2 : Windows and/or Data partition : 102gb
    Partition 3: Windows and/or Data partition : 192gb

    Either to wipe-out everything on you computer OR you will have to create a fourth partition (using DISKPART shrink command) with the size quivalent to 50% of the space used on your Windows partition.

    If you select the second option, you will have to modify the SETTINGS.INI file to adapt-it to your need (read documentation) and NOT forgot to set the WIPEUSBDVD settings to 0.
     
    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
    #271 AnarethoS, Oct 15, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)

    OK, here is what I can reccomend you. It is the best I can do for now.

    1) On a test computer/VmWare : Install Windows with the basic 3 partition configuration and capture the image and create the DVD set
    2) On the final computer do :
    2.1) Reinstall Windows from the DVD. The computer will have 3 partitions. Once restore is completed, DO NOT REBOOT!
    2.2) Using DISKPART (from command prompt), resize the WINDOWS partition to create the fourth partition (lots of help on the Internet to do that)
    2.3) Reboot into Windows. Should be in AUDIT mode. Install drivers/updates/etc.
    2.4) Use the script at the end of this message (save it in a CMD file) to modify the SETTINGS.INI file to disable the WIPE option (set it to 0).
    2.5) Run SYSPREP as specified in the documentation
    2.6) Reboot to RecoveryEnvironment and capture the system image. It will now include the modified SETTINGS.INI file in the Recovery Environment, so if the user create a DVD set, it will NOT wipe out the partition on the computer. But, then, you will need to manually create them if you change your hard-disk drive...

    The partition on the final computer will be like this :
    1: Recovery
    2: Boot
    3: Windows
    4: Data

    SCRIPT
    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 allo 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...
  12. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    BTW, I am not at home, so I can not check is my previous script is correctly working or not.
    I will test it maybe tonight if my GF let me touch my computer :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    #273 Per Henrik Rasmussen, Oct 15, 2010
    Last edited by a moderator: Apr 20, 2017
    Ok
    But instead of using diskpart to make the new partition do you think it`s safe to use Paragon Partition Manager 9.0 Professionel in AUDIT mode ?
    And one more question
    is 2:BOOT
    the S:SYSTEM ?
     
  14. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Yes, safe to you waht you want. Anyway, you can always restore back from the DVD since you have nothing installed since the recovery.

    And yes, by BOOT I meant SYSTEM (I always switch from one word to the other one.... )
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Ok
    Have a nice Weekend
    Take a breake
    and spent some time with your GF
    :whistling:
     
  16. mickyjim

    mickyjim MDL Novice

    Aug 18, 2009
    33
    4
    0
    Hi just d/l the package beta 2 and extracted but the documentation file is corrupted i tried to/dl and extract again still have the same problem can you see if you can fix this please i have the earlier version but need new info for changes many thx
     
  17. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,591
    1,587
    150
    Why are u using beta2 when beta9 is out?
     
  18. Per Henrik Rasmussen

    Mar 29, 2008
    112
    13
    10
    Now i`ve finished making the generic image and is back in Windows (still in Audit mode)
    Started the Recovery Tool/make DVD
    Got a folder (Backup)on my desktop containing 3 ISO files (disk 1,2and 3)

    1. is 3.1GB
    2. is 2.92 GB
    and the
    3. is only 4.74 MB

    Now i`m wondering why it is split into 3 ISO files when it could easyly be on 2 normal (4.7GB) writeable single layer media`s

    Could you ad an option to choose single/dual layer (maybe HDDVD/BDVD to)
    Before the proces starts ?
    And this funny
    I´ve burned the files but when i attempted to burn the 3. it ejected the DVD media i inserted and told me that it was not a suitable media (or something like that)
    i inserted insted a CD-R media and "voila"
    Finished
    :rolleyes:
    Now i`ll try to restore from them.
    Ad a partition, use the script anatheroS posted earlyer
    and se what happens
    Cross your fingers
    :drive1:

    Ooooohhhhh f**k !!!!!!
    It will no boot from Disk 1
    :worthy:

    Well fortunatly i made a backup of that backup folder from the desktop to a USB HD and on my main rig i burned disk 1 using nero express and now it booted

    Update:

    I had to burn the other 2 ISO`s on my main rig to make them work.

    Just inserted disk 3
    :eek:

    Update:

    And once again OHHH NO !!!!!!!!
    "An error occured"
    :(

    Update :

    Tried to start the procedure again.
    Booting from disk 1 and when prompted to inserted disk 2 i did that
    and for about 20 minutes nothing happens.
    Stuck with "Please wait while .........." window !!!!!

    Update:

    20 minutes later
    I think i have to Terminate
    and come back another day

    Have a nice Weekend
    o_O
     
  19. gamepoint

    gamepoint MDL Senior Member

    Jan 4, 2010
    456
    59
    10
    would you consider adding a few more language when the final release is available?