Skip to content

Commit

Permalink
Continue on #106
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Jun 29, 2021
1 parent 8f466a3 commit d8eac08
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ If $CmdLine[0] > 0 Then
Case "/s", "/silent"
ChecksOnly()
_ArrayDelete($CmdLine, 1)
ContinueLoop
Case "/f", "/format"
Select
Case UBound($CmdLine) <= 3
Expand Down Expand Up @@ -122,7 +123,7 @@ Func ChecksOnly()
$aResults[2][1] = @error
$aResults[2][2] = @extended

$aResults[3][0] = _CPUCoresCheck
$aResults[3][0] = _CPUCoresCheck()
$aResults[3][1] = @error
$aResults[3][2] = @extended

Expand Down
28 changes: 14 additions & 14 deletions includes/_Checks.au3
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Func _ArchCheck()
Case @CPUArch = "X64" And @OSArch = "X64"
Return True
Case @CPUArch = "X64" And @OSArch = "X86"
SetError(1, 0, 0)
SetError(1, 0, False)
Case Else
SetError(2, 0, 0)
SetError(2, 0, False)
EndSelect
EndFunc

Expand All @@ -22,7 +22,7 @@ Func _BootCheck()
Case "Legacy"
Return False
Case Else
SetError(1, 0, 0)
SetError(1, 0, False)
EndSwitch
EndFunc

Expand All @@ -37,10 +37,10 @@ Func _CPUNameCheck($sCPU)
$sLine = FileReadLine(@LocalAppDataDir & "\WhyNotWin11\SupportedProcessorsAMD.txt", $iLine)
Select
Case @error = -1
SetError(2, 0, 0)
SetError(2, 0, False)
ExitLoop
Case $iLine = $iLines
SetError(3, 0, 0)
SetError(3, 0, False)
ExitLoop
Case StringInStr($sCPU, $sLine)
Return True
Expand All @@ -56,10 +56,10 @@ Func _CPUNameCheck($sCPU)
$sLine = FileReadLine(@LocalAppDataDir & "\WhyNotWin11\SupportedProcessorsIntel.txt", $iLine)
Select
Case @error = -1
SetError(2, 0, 0)
SetError(2, 0, False)
ExitLoop
Case $iLine = $iLines
SetError(3, 0, 0)
SetError(3, 0, False)
ExitLoop
Case StringInStr($sCPU, $sLine)
Return True
Expand All @@ -75,10 +75,10 @@ Func _CPUNameCheck($sCPU)
$sLine = FileReadLine(@LocalAppDataDir & "\WhyNotWin11\SupportedProcessorsQualcomm.txt", $iLine)
Select
Case @error = -1
SetError(2, 0, 0)
SetError(2, 0, False)
ExitLoop
Case $iLine = $iLines
SetError(3, 0, 0)
SetError(3, 0, False)
ExitLoop
Case StringInStr($sCPU, $sLine)
Return True
Expand Down Expand Up @@ -131,9 +131,9 @@ Func _GetDirectXCheck($aArray)
Case StringInStr($sDXFile, "DDIVersion:12") And StringInStr($sDXFile, "DriverModel:WDDM2")
Return 1
Case Not StringInStr($sDXFile, "DDIVersion:12") And StringInStr($sDXFile, "DriverModel:WDDM2")
SetError(1, 0, 0)
SetError(1, 0, False)
Case StringInStr($sDXFile, "DDIVersion:12") And Not StringInStr($sDXFile, "DriverModel:WDDM2")
SetError(1, 0, 0)
SetError(1, 0, False)
Case Else
Return False
EndSelect
Expand All @@ -150,7 +150,7 @@ Func _GPTCheck()
If $aDisks[0] = $aDisks[1] Then
Return True
Else
SetError($aDisks[1], $aDisks[0], 1)
SetError($aDisks[1], $aDisks[0], True)
EndIf
Case Else
Return False
Expand Down Expand Up @@ -218,11 +218,11 @@ Func _TPMCheck()
Case _GetTPMInfo(1) = False
Return False
Case Not Number(StringSplit(_GetTPMInfo(2), ", ", $STR_NOCOUNT)[0]) >= 1.2
SetError(1, 0, 0) ; Under Version 1.2
SetError(1, 0, False) ; Under Version 1.2
Case _GetTPMInfo(0) = True And _GetTPMInfo(0) = True And Number(StringSplit(_GetTPMInfo(2), ", ", $STR_NOCOUNT)[0]) >= 2.0
Return True
Case _GetTPMInfo(0) = True And _GetTPMInfo(0) = True And Number(StringSplit(_GetTPMInfo(2), ", ", $STR_NOCOUNT)[0]) >= 1.2
SetError(2, 0, 0) ; Under Version 1.2 ????
SetError(2, 0, False) ; Under Version 1.2 ????
Case Else
Return False
EndSelect
Expand Down

0 comments on commit d8eac08

Please sign in to comment.