OEM Recovery Partition Creator for Windows

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

  1. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    Well lets see if it is really missing or just not accessable...goto folder options in control panel and show all hidden, system, all files. Once you do that then goto C:Windows\System32\Recovery and see if the winre.wim is there or at the root of your hdd....should be C:Windows\System32\Recovery. If nothing else do a search for it on whole hdd.

    I know for win 7 it is under C:Windows\System32\Recovery\Backup\WinRe.wim

    I just read that hp's recovery partitions are locked so that could be your issue as well. Doing more reading. If this is the case then you will need to nuke the drive....write zeros to it in order to get rid of it....if that is what you are wanting to do. If it is locked then you wont be able to just format or repartition it. I have read a lot of complaints about hp's recovery partition. Keep in mind if you get rid of the original recovery partition in most cases you void your warranty.
     
  2. paulbram

    paulbram MDL Novice

    Jan 20, 2013
    11
    0
    0
    From an admin cmd prompt I ran "dir /s /b WinRE.wim" from the root and nothing came back.

    So, in the course of running this tool many times I eventually noticed I had quite a few redundant recovery partitions. In an effort to clean things up, I used diskpart to force delete all of the extra partitions. Was this a bad idea? At this point, I don't really care about my warranty, I just want to nuke this thing and make it work for me.

    Should I just install windows 8.1 from the ISO/USB, but first delete all partitions? Do I really need to write zeros to the drive? Isn't deleting the partition enough?

    Does the autounattend.xml process create any logs or anything to help track down what is going wrong?

    Edit: I FOUND IT! It looks like I have a new drive I didn't notice initially. Actually, this is really weird. Somehow I ended up with two copies of Windows installed on two different drives. When I reboot the machine I am prompted to select one or the other. Windows 8.1 on volume 4 or Windows 8.1 on volume 3.

    The WinRE.wim file is located at I:\Recovery\WindowsRE\Winre.wim. The I: drive is labeled as "RECIMAGE".

    What makes this even stranger, is if I select the copy of Windows on volume 4, I get the expected "System Preparation Tool" popup (no I didn't click ok), but I do not see the I: drive at all. However, if I reboot and select partition 3, then I see the I: drive and can find WinRE.wim.

    So, I found it. I guess that's good news. Should I adjust the script to reference the file from here? Or is there a better way to get my system prepped properly?

    Thanks!
     
  3. paulbram

    paulbram MDL Novice

    Jan 20, 2013
    11
    0
    0
    Ok, I made a few incorrect statements above. Yes, there are two copies of Windows installed. No, one isn't magically able to see something the other can't. It turns out, running the "Install - Windows 8.1.cmd" script is what creates the I: drive with the included WinRE.wim file.

    So... now I need to figure out why this script is able to somehow create WinRE.wim on the I: drive yet still expects to find it in c\windows\system32\recovery.
     
  4. mckinnon81

    mckinnon81 MDL Novice

    Nov 30, 2013
    5
    0
    0
    Love the script. Thanks. After I lost my recovery partition on my Laptop but still having access to a Win 7 media I was able to recreate my own recovery partition with out the bloatware from the manufacture.

    Now I want to do the same thing with my Desktop PC. But I have a small problem.

    I have a 120 SSD (Windwows 8) and a 1.5TB HDD (Data)

    I want to have the recovery partition installed on the 1.5TB and use the SSD purely for windows. I believe I will need to modify the unattended.xml but not sure what needs to be changed.

    So I want:

    120GB SSD
    100mb (System Boot)
    Windows Install (Rest of Drive)

    1.5TB
    12gb (or 20gb) Recovery Partition
    Rest of Drive (Data Partition)

    Any help on achieving this is appreciated.
    Thanks.
     
  5. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    @ paul
    I think I am more confused now then before. lol How many partitions do you have on that drive? I dont think you need to write zeros but remove all partitions then add autounattend.xml file to your windows iso/usb installation media. Add this recovery software folder to the windows iso/usb media as well so everything is in one iso/usb media. Boot from the iso/usb media and it should create your partitions and when done with installing windows it will boot into audit mode (you will see the sysprep window which you close). Install drivers you wish and what not and reboot machine which auto goes back into audit mode in which you close the sysprep again. While in audit mode check disk management and see if you only have a system partition, windows partition and recovery partition...if so the you are now ready to run the Install- win 8.cmd file. It should now capture the image then it is ready for end user which the script will tell you that when finished.

    I would never edit any of the cmd scripts for then no one can help for the original scripts arent the same and it is harder to troubleshoot. You should only edit autounattend.xml file and resetpartition.txt file to suite your needs as far as the partition creation.

    Seems like you did enter audit mode for you said you have to close the sysprep window so now you are further along then before so that is a good thing.
     
  6. TFL_User

    TFL_User MDL Novice

    Nov 22, 2013
    11
    0
    0
    I appreciate the advice i will look into it when i have a little more time. The unit i was currently working on had to go back to the customer so i ended up figuring something out with the legacy version. I hope that we can get this resolved in my next go. I will keep checking back for a reply from AnarethoS :D.
     
  7. paulbram

    paulbram MDL Novice

    Jan 20, 2013
    11
    0
    0
    Actually, I've always been able to get this far so I don't think getting into audit mode has been a problem for me. It's just that when I am in audit mode, there is no WinRE.wim file in c:\windows\system32\recovery.

    However, I was doing it a bit different than you suggested. Here is what I did.
    1. Downloaded 8.1 ISO off of MSDN
    2. Mount, copy/paste to desktop
    3. Setup USB key according to instructions with autounattend.xml at root, settings properly created, boot files copied into proper folders etc
    4. With USB key in drive, ran setup.exe off of the Win8 copy on my desktop
    5. Machine installs automatically and I am now in Win8 (audit mode).
    6. Installed all drivers to get machine the way I want
    7. Copied the installer folder to my desktop
    8. ran script which complains about missing WinRE.wim

    So, it seems my method was slightly different than what you suggested. Tonight I will try setting up my USB key with everything on it, including the 8.1 ISO and all files necessary. I will then delete all partitions and install 8.1 off the key and see if I get different results.

    Hopefully the 8.1 install process (from USB key) allows me to first delete the existing partitions otherwise I'm not entirely sure I know how to clean up my old partitions prior to running the install.

    Thanks!
     
  8. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
  9. paulbram

    paulbram MDL Novice

    Jan 20, 2013
    11
    0
    0
    Ok, so I finally got past the WinRE issue! I basically did the same exact thing I did earlier, but made a few changes.
    1. I put everything I needed on the USB key, but NO autounnatend.xml at the root. I then installed Win8.1 stock first and removed ALL existing partitions.
    2. Once I was in stock 8.1, I then put the autounnatend.xml file at the root of the USB and installed again
    3. In Audit mode, I REMOVED the USB key prior to running the script in the Install dir. Previously, I think I ran the install with the USB key still inserted. Not sure if that matters or not.

    At this point, it appears to be processing normally. Hopefully it will go through properly.

    Thanks for your help!
     
  10. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    So I take it, it was the extra partitions causing the issue then from the sounds of it. Good you got it working again. As far as my help...was a great learning process for me and you. Take care and keep in touch.
     
  11. paulbram

    paulbram MDL Novice

    Jan 20, 2013
    11
    0
    0
    Just to wrap this up. It is now working PERFECTLY! :cool:

    I just have to say... despite my troubles, this tool is AMAZING and is a huge help! The PC refresh/reset feature in Win8 is a really handy thing, and the fact that I can now tweak it just the way I want really rocks!

    Thanks!
     
  12. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2492 AnarethoS, Dec 4, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    For the problem about the recovery environment not enabled under Windows 8/8.1, try the following

    Create the following path
    Code:
    C:\Windows\Setup\Scripts 
    
    Create a file named
    Code:
    FirstLogon.cmd
    
    Copy the following intoo the file before running my installation script
    Code:
    REAGENTC /ENABLE
    
    Shoudl fix the problem avout the recovery environment not activated.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    I have an Asus Transformer with 8.1. Lefacy mode is not available. Only UEFI/GPT.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    I have installed windows 8.1 uefi, used autoanattend .XML, create all the partitions, recovery tools, testing the recovery usb is ok, the snapshot is ok, I created the recovery dvd, two iso files and an empty txt file, tried the recovery through on-screen the two dvds,.
    I a so large during the procedure to insert a third dvd, why?
    1 dvd is ok, then after the 2 dvd, then requested a third dvd, but the recovery tool has created 2 dvd.
    The rest of the recovery tools is all ok, only restore error with dvd.
    Help me please with recovery tools on dvd.
    :worthy:
     
  15. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    I know in the legacy version you had to close the req window in order for it to continue creating the iso's. I wonder if that same issue is still there for the alpha? You might try it and see if the third iso is created after closing that req window. Worth a shot. lol
     
  16. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    i used 1.3.16 alfa for uefi for 8.1, recovry tools have problem for recovery on dvd
     
  17. luxcer

    luxcer MDL Novice

    Jan 15, 2013
    32
    4
    0
    The problem is in the process of reinstalling the system with dvd
     
  18. RJOliver

    RJOliver MDL Novice

    Nov 27, 2013
    16
    0
    0
    So i tried the firstboot.cmd but it sill gives me the same issue:

    REAGENTC.EXE: Winodws RE must be installed on a simple volume formatted using NTFS.

    This is the 3rd system i have tried this with and the second 8.1 ISO.

    I check the drive and it is formatted in NTFS (Windows 8.1 runs fine just cannot enter recovery for restore).

    Edit: This is the /info from reagentc just in case that helps:

    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-000000000000
    Recovery image location: \\?\GLOBALROOT\device\harddisk0\partition1\RecoveryImage
    Recovery image index: 1
    Custom image location:
    Custom image index: 0


    REAGENTC.EXE: Operation Successful.
     
  19. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    firstlogon.cmd will not run if not a true win 8.1 oem with key in bios. If you are not installing this onto a true win 8.1 with oem key in bios then you should use setupcomplete.cmd file instead. I think this is where some get confused on this. Just out of curiousity...after you boot the machine into windows desktop (not audit mode) have you tried to run the /enable and see if it works....it should. Also how many partitions are created on those machines you are trying this project on? Should be system, recovery and windows.....no others.....if there are then you will need to remove those partitions and if need be there is a video I posted from youtube showing how to do this a page back. Then try it again and let us know.
     
  20. RJOliver

    RJOliver MDL Novice

    Nov 27, 2013
    16
    0
    0
    Hi thanks for the reply. The systems we are testing this on are Windows 8 Systems with the key in the bios. I make sure after installing and being in audit mode to enter the key and activate it before running the installer. I am using the default autounattned file provided and it is creating the 3 partitions boot main and recovery. After running the installer and entering the os (out of audit) is when i am receiving this error and it will not enable recovery mode.

    Windows 7 and windows 8 run perfectly fine with the installer its only the 8.1 i am having issues.

    Thanks for your time.

    Edit: Re reading you said true 8.1 oem. These are 8.0 oem and the key enters fine in audit mode could that really be the issue? it is activated and everything else runs fine. I dont see how that would effect recovery.