Skip to content

Commit

Permalink
Add descriptions for Passing/Failing
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl authored Jun 24, 2021
1 parent 7497fa1 commit 4c20bd1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,45 @@ $sTPM = _StringBetween(FileRead(".\WhyNot.txt"), "TpmPresent", "TpmReady")[0]
$sTPM = StringStripWS($sTPM, $STR_STRIPALL)
$sTPM = StringTrimLeft($sTPM, 1)

If $sTPM = "True" Then
$sTPM = "Present"
$sTPMText = "Congrats, this value checks out."
Else
$sTPM = "Not Present"
$sTPMText = "TPM should have a 'Present' result. This means a TPM is installed and enabled. If you have an AMD Ryzen Processor, you may have a TPM that is not enabled. If you have a newer Intel Processor, you MAY have a TPM that is not enabled but it is not guaranteed, you can check at https://ark.intel.com/. If not enabled, you can adjust this in your motherboard settings."
EndIf

RunWait("powershell -Command $env:firmware_type | Out-File -FilePath .\WhyNot.txt", "", @SW_HIDE)

$sBOOT = FileRead(".\WhyNot.txt")
$sBOOT = StringStripWS($sBOOT, $STR_STRIPALL)
If Not $sBOOT = "Legacy" Then
$sBOOTText = "Congrats, this value checks out."
Else
$sBOOTText = "BOOT should have a 'UEFI' or 'Secure' result. This means that your computer is using modern and secure code to prevent data tampering during boot. You can adjust this in your motherboard settings after ensuring that your disk below is GPT."
EndIf

RunWait("powershell -Command Get-Partition -DriveLetter C | Get-Disk | Out-File -FilePath .\WhyNot.txt", "", @SW_HIDE)

$sGPT = FileRead(".\WhyNot.txt")
If StringInStr($sGPT, "GPT") Then
$sGPT = "GPT"
$sGPTText = "Congrats, this value checks out."
Else
$sGPT = "Not GPT"
$sGPTText = "DISK should have a 'GPT' result. This means your disk can have it's data on the disk organized in more efficient and modern ways. You can adjust this in Disk Management. Additionally, Intel has a guide available, Google Search 'Intel Converting Legacy' (without quotes)."
EndIf

FileDelete(".\WhyNot.txt")

MsgBox(0, "WhyNotWin11", "TPM:" & @TAB & $sTPM & @CRLF & _
@CRLF & _
$sTPMText & @CRLF & _
@CRLF & _
"BOOT:" & @TAB & $sBOOT & @CRLF & _
"DISK:" & @TAB & $sGPT)
@CRLF & _
$sBOOTText & @CRLF & _
@CRLF & _
"DISK:" & @TAB & $sGPT & @CRLF & _
@CRLF & _
$sGPTText)

0 comments on commit 4c20bd1

Please sign in to comment.