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,794
    90
    I dont know about windows 8 but I know on windows 7 office 2010, vlc, gburner (added reg file to be installed during first logon for registration), winrar, imgburn, used wsus offline to install updates offline, hypersnap, ccleaner, adobe reader, ultraiso (added reg file to be installed also from first logon for registration), firefox, .net 4.5 and all vc run times installed perfect. OEM activated my windows 7 also. Even if I recover using function key or usb it installs everything and also activated incuding not only windows 7 but office 2010 as well. In fact I just used this on my wife's lappy without issues.

    Now firewalls and av's are not made to install during audit mode and even some apps will not work so it is a trial and error type procedure until you get it how you want it. Audit mode can be tricky but if you are familiar with the registry you could make it work by adding reg files to be installed during first logon or even installing them from a setupcomplete.cmd for win 7 or firstlogon.cmd for win 8 to do any installs that might be tricky (if a file is used by a app that uses the user area of folders and files like where the temp folder is for current user then that isnt setup yet for the end user therefor it will fail to install). Always a way around things. ;) Even OEM manufactures do installs on first login so that should let ya know some things just wont install correctly from Audit mode.

    I would advise using vmware or something simuliar for testing till you get it how you want it.
     
  2. PaulC

    PaulC MDL Novice

    May 15, 2013
    4
    0
    0
    this is a great tool, i always wondered how it was done, now i can save everything..
    thankinu
     
  3. minhuq

    minhuq MDL Novice

    May 15, 2013
    2
    0
    0
    Thanks for advice. I got my apps backed up successfully. I used Advanced Token Manager to backup my windows and ms office keys before doing OEM Recovery Partition. In Audit mode I restore windows and office activation from backup. They are activated. Then I made the recovery partition. However for the first logon only ms office is still activated, windows is not activated. I have to manually run the Advanced token manager again. Any idea to keep windows activation as well? Thanks
     
  4. wahab123

    wahab123 MDL Novice

    May 17, 2013
    9
    0
    0
    And What Is ImageX.exe For Windows 7 Recovery partition And How It Work can u Explain?:(
     
  5. wahab123

    wahab123 MDL Novice

    May 17, 2013
    9
    0
    0
    What IS ImageX.exe ? Can u tell Me How Create Recovery partiton In Windows 7 With new Tool Version
     
  6. wahab123

    wahab123 MDL Novice

    May 17, 2013
    9
    0
    0
    And What Is ImageX.exe For Windows 7 Recovery partition And How It Work can u Explain?
     
  7. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,888
    16,542
    340
  8. stylemessiah

    stylemessiah MDL Novice

    Aug 14, 2009
    27
    8
    0
    #2208 stylemessiah, May 18, 2013
    Last edited by a moderator: Apr 20, 2017
    System Restore Shows 2 C: Drives After Recovery......

    Im still using the legacy edition, so my post relates to that. May still apply to the new edition, i havent had time to try it out yet...

    The one thing i found to be an issue with Recovery Tools is if system protection was on when you made the image, when restoring the image, System Protection would be borked. It would show 2 C: drives and would break system Protection, and when installing some updates they would fail as the OS couldnt create a restore point. Of course you could fix this by disabling all System Protection, and then re-enable it for C:. thats fine if its on your system, or you warned people you set this up for and gave them documentation on how to fix it.

    I finally got around to solving this in an automatic way.

    The steps i use as as follows:

    1) Before installing the OEM Recovery tools (after you have installed apps and customised things etc) turn System Protection OFF
    2) Create or copy the files restoreenable.ps1 and restoreenable.vbs to c:\windows
    3) Create or merge restoreenable.reg

    Then install the OEM Recovery Tools and image

    So what does this do?

    1) It runs restoreenable.vbs via RunOnce post recovery and warns the user via vbscript msgbox that its about to re-enable System Protection - You can edit the message in the restoreenable.vbs file, look for the 4th last line - WScript.Echo. You can test your message display by copying just the WScript.Echo line into a new txt file, naming is as vbs, then running it to make sure it displays as you like. It then calls the restoreenable.ps1 file. It does all this with NO UAC prompt.

    restoreenable.vbs:
    Code:
    '---------------------------------------
    'Elevate this script before invoking it.
    '25.2.2011 FNL
    '---------------------------------------
    bElevate = False
    if WScript.Arguments.Count > 0 Then If WScript.Arguments(WScript.Arguments.Count-1) <> "|" then bElevate = True
    if bElevate Or WScript.Arguments.Count = 0 Then ElevateUAC
    '******************
    'Your script goes here
    '******************
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run("powershell.exe -ExecutionPolicy Unrestricted c:\windows\restoreenable.ps1")
    
    '-----------------------------------------
    'Run this script under elevated privileges
    '-----------------------------------------
    Sub ElevateUAC
        sParms = " |"
        If WScript.Arguments.Count > 0 Then
                For i = WScript.Arguments.Count-1 To 0 Step -1
                sParms = " " & WScript.Arguments(i) & sParms
            Next
        End If
        Set oShell = CreateObject("Shell.Application")
        WScript.Echo "System Protection needs to be turned on after System Recovery." & VBCRLF & VBCRLF & "Shortly after the desktop appears a black windows will appear as System Protection creates a restore point." & VBCRLF & VBCRLF & "This only appears only once." & VBCRLF & VBCRLF & "Please do not use the computer until the restore point is created and the black box disappears. This usually takes less than a minute." & VBCRLF & VBCRLF & VBCRLF & "Click OK to continue...." 
        oShell.ShellExecute "wscript.exe", WScript.ScriptFullName & sParms, , "runas", 1
        WScript.Quit
    End Sub

    2) It runs restoreenable.ps1 which:
    a) enables System Protection
    b) sets System Protection to use 5% (you can adjust the maxsize property to any percentage you like)
    c) creates an initial restore point

    restoreenable.ps1:
    Code:
    enable-computerrestore -drive "c:\"
    vssadmin resize shadowstorage /on=c: /for=c: /maxsize=5%
    checkpoint-computer -description "Initial Recovery Point"
    exit

    restoreenable.reg:
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
    "RestoreEnable"="c:\\windows\\restoreenable.vbs"
    After creating the image, and rebooting the PC, you will see what it does, as it will of course run :)

    Of course you can test this on your own system before deploying..just disable System Restore and create/copy the files, merge the registry and reboot

    Files are available for download here: View attachment 22093

    Hope this helps others
     
  9. bsodlover

    bsodlover MDL Novice

    May 18, 2013
    16
    5
    0
  10. geabo

    geabo MDL Junior Member

    Mar 16, 2012
    66
    13
    0
    Hello. i translated version 3.15 to Danish language but dont know how to integrate it. please help with that :) Regards Geabo
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. technomaster

    technomaster MDL Junior Member

    Nov 4, 2012
    81
    16
    0
    Thanks now working properly B-)

     
  12. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    If you do a system reset (and not a system refresh) is everything OK then?

    As I remember, using the Refresh option remove all icons and start menu entries from the user account. So the application will still be installed but you will have to search for it in the "Program Files" folder. Best way to avoid that is tou use a script on first start to reinstall all your application on first logon.

    You can also move all icons from the current user start menu to the "All users" start menu. Should works.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    Personnaly, I just install the Drivers + Updates during the Audit part. All my apps are installed on first boot. This way, I can always "mount" my WIM file and remove/add/update my software package as time goes by....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    ImageX is a tool from Microsft that allow you to create WIM file which is an image if your Windows installation. Windows 8 use the built-in DISM file. Windows 7 require you to downlod the Microsoft WAIK package to get thèses 2 file. As per Microsoft EULA, I am not allowed to give them whit my Tools. I did it in the past, but I don't do it anymore.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    #2215 AnarethoS, May 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    #2216 AnarethoS, May 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,888
    16,542
    340
  18. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,200
    1,403
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Dirk2512

    Dirk2512 MDL Junior Member

    Jan 6, 2011
    60
    3
    0
    @AnarethoS i have an idea, how hard would it be to add a fuction or create a script that would install the product key and cert to the "system /S:" partition.

    The premise
    install windows (7/8)
    inside audit mode install software and drivers etc
    run afore mentioned script
    to install product key and cert for perminant activation even if full restore is done,
    no need to re-enter the product key
     
  20. Dirk2512

    Dirk2512 MDL Junior Member

    Jan 6, 2011
    60
    3
    0
    simular to loader but for legit OS's