OEM Recovery Partition Creator for Windows

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

  1. 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?:(
     
  2. 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
     
  3. 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?
     
  4. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,826
    19,045
    340
  5. stylemessiah

    stylemessiah MDL Novice

    Aug 14, 2009
    37
    12
    0
    #2205 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
     
  6. bsodlover

    bsodlover MDL Novice

    May 18, 2013
    16
    5
    0
  7. geabo

    geabo MDL Junior Member

    Mar 16, 2012
    67
    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...
  8. technomaster

    technomaster MDL Junior Member

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

     
  9. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    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...
  10. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    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...
  11. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    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...
  12. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2212 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...
  13. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    #2213 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...
  14. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,826
    19,045
    340
  15. AnarethoS

    AnarethoS MDL Expert

    Jul 31, 2009
    1,297
    1,587
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. 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
     
  17. Dirk2512

    Dirk2512 MDL Junior Member

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

    htk59 MDL Junior Member

    Aug 1, 2010
    58
    8
    0
    Hi, i fresh install windows 8 pro and all the pack office. alls are activated. how can i create a restore partition of my installation
     
  19. yeop

    yeop MDL Novice

    Feb 13, 2013
    1
    0
    0
    i use this software, but it delete my DATA partition :( , how do i prevent this ?

    my hd
    1 - system reserved
    2 - windows 7 system
    3 - data - personal files etc

    when i copied everything like in the documentation and start boot windows 7 installation, it straight to installing windows, after finish i check my DATA partition is gone :( , care to teach my step by step to prevent this? how can i configure this software to only delete 2 first partition only ( system reserved and windows 7 system) and leave the DATA partition alone? thanks
     
  20. The_Guardian

    The_Guardian Contributor

    May 7, 2012
    2,054
    6,803
    90
    This isnt to be used after you do a fresh install but during your fresh install. That is why you lost your data. Should have backed up first. As far as activating win 7 or win 8 you could use the multi oem activation that is listed here in this forum to activate win 7 but to activate win 8 there is only kms or loader for server 2012. Those are your only options. If using this app here, ppl should really read the documentation with it and understand it, then use vmware or something simuliar in order to learn and test it.