Windows 10 Recovery Tools - Bootable Rescue Disk


  1. Posts : 2,799
    Linux Mint 20.1 Win10Prox64
       #201

    Superfly said:
    Hmmm..

    OK - now, me, not knowing a great deal about WinPE and what's causing the different behaviour

    ... are you guys enabling the .Net core components or installing the redist (client profile)... just thinking maybe the framework itself alters core system components...
    Well, turned out it's not Net Framework that caused the problem. The problem was all applications that were written using Visual C++ need to have Visual C++ Runtime added to WinPE. It's strange that if I took out Net Framework then they'd work without C++ Runtime But yours won't because it needs NF.
    Now everything is working. :)

    Windows 10 Recovery Tools - Bootable Rescue Disk-working.png

    @Superfly,
    However, there's a small problem with your ShowkeyPlus. I have 2 Windows 10 on separate SD's with their own boot manager. So if I boot into the 1st Windows, I put the second SD offline and vice versa because there's a problem with "Restore Point", I don't use it but I don't want to see the other SD while I am not using it. By doing that, when booting into WinPE, WinPE cannot see them, run ShowkeyPlus then I'll get a red screen with error message, I forgot what it was but something out of range and cannot be < 0.
      My Computer


  2. Posts : 5,478
    2004
       #202

    OldMike65 said:
    Not quite sure how to make these changes lx07...... so didn't even try. Why these darn shortcut arrows are displayed anyhow on the PE desktop is a pain, and not needed I think. :)
    Well the way to remove them in PE is the same as in normal windows (Shortcut Arrow Icon - Change, Remove, or Restore in Windows 10 - Windows 10 Forums). However you need to change the boot.wim so you mount the ISO, mount the boot.wim, load the registry, change it, unload the registry and write back the changed boot.wim then recreate the ISO.

    This powershell will do it for you if you want (it assumes you have downloaded the ADK to C:\Program Files and @Kyhi ISO is mounted but you can change that in the variables at the top).

    It is a bit of effort for a rather marginal improvement though IMO but you did ask :)
    Code:
    $ADK = "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit"
    $PEArch = "amd64"
    $PELang = "en-us"
    
    $HomeDir = "C:\Make-PE"			# This is the work directory where the script is running (you have to make it)
    $ISOPath = "$HomeDir\WinPE.iso"	# Where the ISO goes
    $ISOLabel="My Boot Disk"		# Name of ISOLabel	
    
    # Environment Variables for script
    $WorkDir = "$HomeDir\WinPE_$PEArch"
    $Source="$ADK\Windows Preinstallation Environment\$PEArch"
    $FWFilesRoot="$ADK\Deployment Tools\$PEArch\Oscdimg"
    
    
    ##########
    # GO !!
    ##########
    
    # If new ISO exists, delete it
    if  (Test-Path "$ISOPath") { Remove-Item $ISOPath -Recurse -Force -ErrorAction 0 }
    
    
    # Validate Source exists 
    if (-not (Test-Path "$Source")) {Read-Host -Prompt "ERROR: The following processor architecture was not found: $WinPE_Arch"; exit}
    if (-not (Test-Path "$FWFilesRoot")) {Read-Host -Prompt "ERROR: The following path for firmware files was not found: $FWFilesRoot"; exit}
    $WimDirectory="sources\boot.wim"
    $Drives = Get-PSDrive -PSProvider FileSystem
    Foreach ($Drive in $Drives) {
        $WimPath = $Drive.Root+$WimDirectory
    	if (Test-Path $WimPath) {break}
        Clear-Variable WimPath
    }  
    if (-not $WimPath) {Read-Host -Prompt "ERROR: The existing ISO needs to be mounted"; exit}
    
    # Delete old working directory
    
    $ProgressPreference = "SilentlyContinue"
    Clear-WindowsCorruptMountPoint
    Mount-WindowsImage -Path "$WorkDir\mount" -Remount
    Dismount-WindowsImage  -Path "$WorkDir\mount" -Discard
    $ProgressPreference = "Continue"
    
    Remove-Item $WorkDir -Recurse -Force -ErrorAction 0
    
    # Create new WinPE work directory (copied from copype.cmd in ADK)
    mkdir "$WorkDir"
    mkdir "$WorkDir\media"
    mkdir "$WorkDir\mount"
    mkdir "$WorkDir\fwfiles"
    mkdir "$WorkDir\media\sources"
    
    # Copy the boot files and Existing WinPE WIM to the destination location
    xcopy /herky "$Source\Media\Boot" "$WorkDir\media\Boot\"
    xcopy /herky "$Source\Media\EFI" "$WorkDir\media\EFI\"
    copy "$Source\Media\bootmgr*" "$WorkDir\media\"
    copy $WimPath "$WorkDir\media\sources\boot.wim"
    Set-ItemProperty "$WorkDir\media\sources\boot.wim" IsReadOnly $false
    
    # Copy the boot sector files to enable ISO creation and boot
    copy "$FWFilesRoot\efisys.bin" "$WorkDir\fwfiles"
    if (Test-Path $FWFilesRoot\etfsboot.com) {copy "$FWFilesRoot\etfsboot.com" "$WorkDir\fwfiles"}
    
    # Mount WIM
    Mount-WindowsImage -ImagePath "$WorkDir\media\sources\boot.wim" -index 1 -Path "$WorkDir\mount"
    
    # Registry Changes
    reg load HKLM\WinPE_SYSTEM $WorkDir\mount\windows\system32\config\SYSTEM
    reg load HKLM\WinPE_SOFTWARE $WorkDir\mount\windows\system32\config\SOFTWARE
    
    # from here https://www.tenforums.com/tutorials/8974-shortcut-arrow-icon-change-remove-restore-windows-10-a.html
    reg add "HKLM\WinPE_SOFTWARE\Classes\IE.AssocFile.URL" /v IsShortcut /f
    reg add "HKLM\WinPE_SOFTWARE\Classes\InternetShortcut" /v IsShortcut /f
    reg add "HKLM\WinPE_SOFTWARE\Classes\lnkfile" /v IsShortcut /f
    reg add "HKLM\WinPE_SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /ve
    reg add "HKLM\WinPE_SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v "29" /d "%windir%\\System32\\imageres.dll,-17" /f 
    
    reg unload HKLM\WinPE_SOFTWARE
    reg unload HKLM\WinPE_SYSTEM
    
    ############
    # FINISH UP
    ############
     
    # Unmount the WinPE image
    Get-WindowsImage -Mounted -ErrorAction Stop | ForEach-Object {
    	# Save-WindowsImage -Path $_.ImagePath
    	Dismount-WindowsImage -Path $_.Path -Save -ErrorAction Stop
    }
    
    # Set the correct boot argument based on availability of boot apps
    if (Test-Path "$WorkDir\fwfiles\etfsboot.com") {$BOOTDATA="2#p0,e,b`"$WorkDir\fwfiles\etfsboot.com`"#pEF,e,b`"$WorkDir\fwfiles\efisys.bin`""}
    else {$BOOTDATA="1#pEF,e,b`"$WorkDir\fwfiles\efisys.bin`""}
    
    # Make ISO
    $command="$ADK\Deployment Tools\$PEArch\Oscdimg\oscdimg.exe"
    Write-Host "Creating $ISOPath ..."
    &$command  -l:$ISOLabel -h -m -o -u1 -bootdata:$bootdata "$WorkDir\media" "$ISOPath"
    		
    # Finished
    Write-Host
    Read-Host -Prompt "Press enter to exit."
    Windows 10 Recovery Tools - Bootable Rescue Disk-shortcuts.png
      My Computer


  3. Posts : 134,300
    Windows 11 Pro (x64) 23H2 Build 22631.3296
       #203

    @lx07
    Ok, then when I am really, really bored, I'll try this. Also I didn't use that method posted in your link. I do it a little different.
      My Computers


  4. Posts : 3,453
       #204

    @topgundcp
    If in WinPE mode (i.e X: drive) it checks all other drives for a Windows (or Windows.old) folder... if not found it will crash...

    In this situation what exception handling do you think would be best?
      My Computer


  5. Posts : 5,478
    2004
       #205

    OldMike65 said:
    @lx07
    Ok, then when I am really, really bored, I'll try this. Also I didn't use that method posted in your link. I do it a little different.
    You can also add any drivers you want to the wim while you've got it mounted (I add my wifi adapter as I don't have ethernet)
      My Computer


  6. Posts : 2,799
    Linux Mint 20.1 Win10Prox64
       #206

    @Superfly
    Here's what it looks like when it cannot access the drives containing Windows. After I clicked OK, it came back to the previous screen with running circle. If It were me, I just put on a friendly message then exit the program instead of going back to the first screen.

    Windows 10 Recovery Tools - Bootable Rescue Disk-showkeypluserror.png

    @OldMike65,
    When you mentioned about the Arrows, just noticed that my WinPE doesn't have those. I have to go back and take a look at what I've done.
      My Computer


  7. Posts : 27,180
    Win11 Pro, Win10 Pro N, Win10 Home, Windows 8.1 Pro, Ubuntu
       #207

    topgundcp said:
    @Superfly
    Here's what it looks like when it cannot access the drives containing Windows. After I clicked OK, it came back to the previous screen with running circle. If It were me, I just put on a friendly message then exit the program instead of going back to the first screen.

    Windows 10 Recovery Tools - Bootable Rescue Disk-showkeypluserror.png

    @OldMike65,
    When you mentioned about the Arrows, just noticed that my WinPE doesn't have those. I have to go back and take a look at what I've done.
    Are you using the .exe icons instead?
      My Computers


  8. Posts : 134,300
    Windows 11 Pro (x64) 23H2 Build 22631.3296
       #208

    Topgundcp's is my favorite WinPE version, love the way he has made it look, plus installed his own registered app's!!! Someday, I am going to TRY and learn how I can do the same. Might take me a few months thou.....lol
      My Computers


  9. Posts : 2,799
    Linux Mint 20.1 Win10Prox64
       #209

    Are you using the .exe icons instead?
    Nope. Everything is setup thru script.
      My Computer


  10. Posts : 2,799
    Linux Mint 20.1 Win10Prox64
       #210

    OldMike65 said:
    Topgundcp's is my favorite WinPE version, love the way he has made it look, plus installed his own registered app's!!! Someday, I am going to TRY and learn how I can do the same. Might take me a few months thou.....lol
    @OldMike65,
    Thanks for the kind word. However, Jimmy is more knowlegable than me on this thing, I am just an apprentice


    Just to piss you off, I put back the Arrow keys on mine. :)
    Anyway, I'll let Jimmy knows if he wants to take them out or he's already figured it out. Got to admit they look better without arrow keys.

    Windows 10 Recovery Tools - Bootable Rescue Disk-arrow.png
    Last edited by topgundcp; 12 Dec 2015 at 14:25.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:37.
Find Us




Windows 10 Forums