From 75c6c04b48646e05fafc5a04ed90702b88998c1e Mon Sep 17 00:00:00 2001 From: Sarah <45071533+PrincessAkira@users.noreply.github.com> Date: Mon, 26 Sep 2022 02:53:39 +0200 Subject: [PATCH] added check for checking if path exists for TPM (#195) --- winutil.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winutil.ps1 b/winutil.ps1 index 2a94e43c..c173f1a1 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -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 }