Replace osk
with cmd
during debugging
This commit is contained in:
parent
c0f2c25ef6
commit
1c458f8004
|
@ -49,6 +49,20 @@ $null = New-Module {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
([SetupStage]::Initialize) {
|
([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"))) {
|
if (-not ((Test-Command "choco") -and (Test-Command "refreshenv"))) {
|
||||||
Invoke-Hook "Install-Chocolatey" -Fallback {
|
Invoke-Hook "Install-Chocolatey" -Fallback {
|
||||||
# Install chocolatey
|
# Install chocolatey
|
||||||
|
|
Loading…
Reference in a new issue