Skip to content

Instantly share code, notes, and snippets.

@potatoqualitee
Created December 28, 2021 12:32
Show Gist options
  • Save potatoqualitee/3b147910e5dd94dd201ec76968087bc9 to your computer and use it in GitHub Desktop.
Save potatoqualitee/3b147910e5dd94dd201ec76968087bc9 to your computer and use it in GitHub Desktop.
Get GUID / Product Id / Registration ID from Windows Update EXE Executable
# Install WIX toolset
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\Microsoft.Deployment.Compression.dll"
Import-Module "C:\Program Files (x86)\WiX Toolset v3.11\bin\\Microsoft.Deployment.Compression.Cab.dll"
$cab = New-Object Microsoft.Deployment.Compression.Cab.Cabinfo "$home\Downloads\file\dotnet-sdk-5.0.404-win-x64_a943fac999a30b3eb83580112b793d37de0c0700.exe"
$cab.UnpackFile("0","C:\temp\0.xml")
$a = [xml](Get-Content "C:\temp\0.xml")
$guid = [guid]$a.BurnManifest.Registration.Id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment