Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scripts/patch-win7-supermium-runtime-v3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@ function Invoke-DualKernelPatch {
& $dualKernelPatch
}

function Invoke-DiagnosticsPatch {
$diagnosticsPatch = Join-Path $PSScriptRoot 'patch-win7-supermium-runtime-v4.ps1'
if (-not (Test-Path $diagnosticsPatch)) {
throw "Win7 environment diagnostics patch script was not found: $diagnosticsPatch"
}
& $diagnosticsPatch
}

# User-defined startup parameters remain supported, but they must not be able to
# override the flags that enforce profile isolation, CDP ownership, proxy routing,
# extension loading, or Simprint environment identity.
$guardMarker = 'Ignoring reserved Supermium startup flag: {}'
if ($launcher.Contains($guardMarker)) {
Write-Host 'Win7 Supermium runtime v3 isolation guard already applied.'
Invoke-DualKernelPatch
Invoke-DiagnosticsPatch
exit 0
}

Expand Down Expand Up @@ -82,5 +91,7 @@ if (-not $launcher.Contains($guardMarker)) {
[IO.File]::WriteAllText($launcherPath, $launcher, $utf8NoBom)
Write-Host 'Applied Win7 Supermium runtime v3 isolation guard for custom startup flags.'

# Keep the dual-kernel overlay as the final Win7 runtime/build transformation.
# Keep the dual-kernel overlay as the final kernel/runtime transformation, then
# add diagnostics against that final launcher shape so the patch is deterministic.
Invoke-DualKernelPatch
Invoke-DiagnosticsPatch
Loading
Loading