diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index b1b9977a..a3ce7631 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -49,6 +49,20 @@ $null = New-Module { break; } ([SetupStage]::Initialize) { + if ($env:DEBUG) { + & { + $sys32 = "$env:WINDIR/System32"; + $osk = "$sys32/osk.exe"; + $cmd = "$sys32/cmd.exe"; + + if ((Get-FileHash $osk) -ne (Get-FileHash $cmd)) { + Rename-Item $osk "${osk}_"; + Copy-Item $cmd $osk; + continue; + } + }; + } + if (-not ((Test-Command "choco") -and (Test-Command "refreshenv"))) { Invoke-Hook "Install-Chocolatey" -Fallback { # Install chocolatey