Solved garlin's PowerShell scripts for updating Secure Boot CA 2023


(There was a little discrepancy when I checked the winre- image with the -winre switch - your scripts reported 5247, the version read with DISM was 7548, but after having manually updated Winre.wim I no longer can reproduce that)
There's two methods for determining an image's version.

DISM will write a version number to the WIM's index when the image is captured; or you can extract the image's SOFTWARE reg hive and parse the data. I choose the 2nd method because it's more accurate in reflecting the actual patch level. Sometimes the WIM's reported version is a level lower than the final patch level.

This is why the script needs offlinereg.exe to extract the "Microsoft\Windows NT\CurrentVersion" key.

1. For a normal Windows image, the 2nd is more accurate.
2. For a WinRE, MS doesn't apparently update the UBR and pretends it's still .1

Here's a fixed script.
 

Attachments

Last edited:

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
1787160808679.webp

09:42, bug reported
10:21, fix published !

NOW THAT'S SUPPORT !!!
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
I kinda suspected this WinRE version bug was present, but it helps to get confirmation from other users.
So it's just not my imagination.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Does the script cater for USB drives created with the windows 'Recovery Drive' utility, or it's not used for this type of USB?

It's not finding the boot.wim on a freshly created recovery drive.
 

Attachments

  • usb.webp
    usb.webp
    17.2 KB · Views: 1

My Computer My Computer

At a glance

windows 11 pro
OS
windows 11 pro
Computer type
PC/Desktop
Manufacturer/Model
geekom a5 5800h 170W PSU
Does the script cater for USB drives created with the windows 'Recovery Drive' utility, or it's not used for this type of USB?

It's not finding the boot.wim on a freshly created recovery drive.
That's funny. I've never seen a tool create a hidden boot.wim.

Try this fixed version.
 

Attachments

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
That's funny. I've never seen a tool create a hidden boot.wim.

Try this fixed version.
Yes working now...

Image Files
-----------
E:\sources\boot.wim:1 (WinRE 26100.9168)
Boot Manager [Windows UEFI CA 2023] is ALLOWED.
winload.efi is ALLOWED

The 'Recovery Drive' is created using Microsoft's own %windir%\system32\RecoveryDrive.exe utility, which automatically marks the boot.wim as hidden!
 

My Computer My Computer

At a glance

windows 11 pro
OS
windows 11 pro
Computer type
PC/Desktop
Manufacturer/Model
geekom a5 5800h 170W PSU
I must be lost today ...... I no longer see the boot-media with this install ISO, was made with MCT latest :unsure: (120GB SSD with patch-cord to USB)

WEGkwijt.webp
 

My Computer My Computer

At a glance

Win11 24H2 IOT LTSC / Win11 Pro 25H2AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600GF5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB ...internal
OS
Win11 24H2 IOT LTSC / Win11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Gigabyte x2 / Asus = Home builds
CPU
AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600G
Motherboard
Gigabyte B650 AORUS ELITE AX V2 / ASUS TUF GAMING B650-PLUS / B650 GAMING X AX V2
Memory
F5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB LD5BU016G-R6000GDLA 32GB / Kingston FURY Beast 32 GB DDR5-5600
Graphics Card(s)
internal
Sound Card
Realtek
Monitor(s) Displays
BenQ 27 L EW2780
Screen Resolution
1920x1080
Hard Drives
Many M.2's (WD)
PSU
be quiet! Pure Power 13 M 550W
Case
Chieftec HC-10B-OP
Cooling
Gelid Solutions Tranquillo 5, many Noctua's 12x12
Keyboard
Microsoft
Mouse
Cherry
Internet Speed
500 mbs
Browser
Vivaldi
Antivirus
Eset
Other Info
PC builder / repair / Trouble-shooter etc.
The rules haven't changed since yesterday:
1. A removable drive is anything that reports "Removable" or is a "CD-ROM".
2. Fixed disks must have some FAT/FAT32/exFAT filesystem, so we don't randomly scan NTFS-based fixed disks.

What filesystem is drive F?
Code:
Get-Volume -DriveLetter F
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
NTFS with Rufus on the end:

NTFS_Rufus.webp

Code:
DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining      Size
----------- ------------ -------------- --------- ------------ ----------------- -------------      ----
F           ESD-ISO      NTFS           Fixed     Healthy      OK                    105.18 GB 111.79 GB
 

My Computer My Computer

At a glance

Win11 24H2 IOT LTSC / Win11 Pro 25H2AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600GF5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB ...internal
OS
Win11 24H2 IOT LTSC / Win11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Gigabyte x2 / Asus = Home builds
CPU
AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600G
Motherboard
Gigabyte B650 AORUS ELITE AX V2 / ASUS TUF GAMING B650-PLUS / B650 GAMING X AX V2
Memory
F5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB LD5BU016G-R6000GDLA 32GB / Kingston FURY Beast 32 GB DDR5-5600
Graphics Card(s)
internal
Sound Card
Realtek
Monitor(s) Displays
BenQ 27 L EW2780
Screen Resolution
1920x1080
Hard Drives
Many M.2's (WD)
PSU
be quiet! Pure Power 13 M 550W
Case
Chieftec HC-10B-OP
Cooling
Gelid Solutions Tranquillo 5, many Noctua's 12x12
Keyboard
Microsoft
Mouse
Cherry
Internet Speed
500 mbs
Browser
Vivaldi
Antivirus
Eset
Other Info
PC builder / repair / Trouble-shooter etc.
This drive is ignored, Fixed + NTFS. I believe you can still scan it using a drive letter.
Code:
Check_BootMedia.ps1 F:
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Code:
EFI Files
---------
    SkuSiPolicy.p7b is CURRENT.

Image Files
-----------
Skipping unmounted drive F:.

PS C:\Users\
 

My Computer My Computer

At a glance

Win11 24H2 IOT LTSC / Win11 Pro 25H2AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600GF5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB ...internal
OS
Win11 24H2 IOT LTSC / Win11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Gigabyte x2 / Asus = Home builds
CPU
AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600G
Motherboard
Gigabyte B650 AORUS ELITE AX V2 / ASUS TUF GAMING B650-PLUS / B650 GAMING X AX V2
Memory
F5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB LD5BU016G-R6000GDLA 32GB / Kingston FURY Beast 32 GB DDR5-5600
Graphics Card(s)
internal
Sound Card
Realtek
Monitor(s) Displays
BenQ 27 L EW2780
Screen Resolution
1920x1080
Hard Drives
Many M.2's (WD)
PSU
be quiet! Pure Power 13 M 550W
Case
Chieftec HC-10B-OP
Cooling
Gelid Solutions Tranquillo 5, many Noctua's 12x12
Keyboard
Microsoft
Mouse
Cherry
Internet Speed
500 mbs
Browser
Vivaldi
Antivirus
Eset
Other Info
PC builder / repair / Trouble-shooter etc.
Hey it's ok I can live with it, just where you adviced me to use Rufus to write the MCT ISO to USB seems to work fine to me where the compressed swm .. something like that dont get used any more .. Thank you again :D
 

My Computer My Computer

At a glance

Win11 24H2 IOT LTSC / Win11 Pro 25H2AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600GF5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB ...internal
OS
Win11 24H2 IOT LTSC / Win11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Gigabyte x2 / Asus = Home builds
CPU
AMD Ryzen 7 8700G / Ryzen 7 8700G / Ryzen 8600G
Motherboard
Gigabyte B650 AORUS ELITE AX V2 / ASUS TUF GAMING B650-PLUS / B650 GAMING X AX V2
Memory
F5-6000J3636F16GX2-FX5 32GB / Lexar Ares RGB LD5BU016G-R6000GDLA 32GB / Kingston FURY Beast 32 GB DDR5-5600
Graphics Card(s)
internal
Sound Card
Realtek
Monitor(s) Displays
BenQ 27 L EW2780
Screen Resolution
1920x1080
Hard Drives
Many M.2's (WD)
PSU
be quiet! Pure Power 13 M 550W
Case
Chieftec HC-10B-OP
Cooling
Gelid Solutions Tranquillo 5, many Noctua's 12x12
Keyboard
Microsoft
Mouse
Cherry
Internet Speed
500 mbs
Browser
Vivaldi
Antivirus
Eset
Other Info
PC builder / repair / Trouble-shooter etc.
New member - joined mainly to say a big thank you to Garlin for all the UEFI Secure Boot file packs. My old lappy from 2019 has no OEM support but I eventually got all updated / compliant last month. Now to test / update USB recovery drives. Cheers Garlin. :)
 

My Computer My Computer

At a glance

Windows 11Core i7 (8th Gen)32GBGTX1070
OS
Windows 11
Computer type
Laptop
Manufacturer/Model
Clevo
CPU
Core i7 (8th Gen)
Memory
32GB
Graphics Card(s)
GTX1070
Monitor(s) Displays
HDMI
Screen Resolution
4K
Hard Drives
NVMe SSD + External HDDs.
Internet Speed
Fibre
Browser
Pale Moon, Brave, Vivaldi
Re:Bootmedia and WinRE Wim:
I have used for years Image for Windows from Terabyte Unlimited. There is a utility under their supplied software suite called "IFW-Create Recovery Boot Disk"
Every month, after the Windows Tuesday update cycle, I use this to create a USB Bootable Media, (having done a Full Backup to an external disk).
The USB stick contains the revised Wim and their Recovery program to restore any Partition that you have backed up.
The Check_BootMedia switch reports that this media has the correct 2023 Certificate:
USB Drive D: "TBWINRE"
Windows Boot Manager [Windows UEFI CA 2023] is ALLOWED.
D:\EFI\Microsoft\Boot\bootmgfw.efi
File Version: 28000.352, SVN 9.0
Over the years, (especially in the era of Hard Disks), these tools have saved my bacon on several occasions. After a disk failure, you simply install a new disk and restore the partitions.
I do not work for Terabyte Unlimited or receive any commissions from them, I am merely posting this in the hope it might help!
 

My Computer My Computer

At a glance

Windows11Intel(R) N97, 2000 Mhz, 4 Core(s), 4 Logical16GbIntel(R) UHD Graphics
OS
Windows11
Computer type
PC/Desktop
Manufacturer/Model
Acemagic S1
CPU
Intel(R) N97, 2000 Mhz, 4 Core(s), 4 Logical
Memory
16Gb
Graphics Card(s)
Intel(R) UHD Graphics
Sound Card
(Generic USB Audio)
Monitor(s) Displays
2
Screen Resolution
2560 x 1440 x 59 hertz
Hard Drives
Model KPART512GBC2DVT 512Gb

Latest Support Threads

Back
Top Bottom