added check for checking if path exists for TPM (#195)

This commit is contained in:
Sarah 2022-09-26 02:53:39 +02:00 committed by GitHub
parent 7ac6d2cbc0
commit 75c6c04b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -673,6 +673,9 @@ $WPFtweaksbutton.Add_Click({
}
If ( $WPFMiscTweaksDisableTPMCheck.IsChecked -eq $true ) {
Write-Host "Disabling TPM Check..."
If (!(Test-Path "HKLM:\SYSTEM\Setup\MoSetup")) {
New-Item -Path "HKLM:\SYSTEM\Setup\MoSetup" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SYSTEM\Setup\MoSetup" -Name "AllowUpgradesWithUnsupportedTPM" -Type DWord -Value 1
$WPFMiscTweaksDisableTPMCheck.IsChecked = $false
}