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 aa976e9 commit c8de0c0
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
53 changes: 52 additions & 1 deletion WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ If @OSVersion = 'WIN_10' Then DllCall("User32.dll", "bool", "SetProcessDpiAwaren
#include <WindowsConstants.au3>

#include ".\Includes\_WMIC.au3"
#include ".\Includes\_Checks.au3"

Opt("TrayIconHide",1)
Opt("TrayAutoPause",0)
Expand Down Expand Up @@ -81,7 +82,7 @@ If $CmdLine[0] > 0 Then
Case UBound($CmdLine) <= 3
MsgBox(0, "Invalid", "Missing FILENAME paramter for /format." & @CRLF)
Exit 1
Case UBound($CmdLine) <= 2 Then
Case UBound($CmdLine) <= 2
MsgBox(0, "Invalid", "Missing FORMAT paramter for /format." & @CRLF)
Exit 1
Case Else
Expand All @@ -105,6 +106,56 @@ Else
EndIf

Func ChecksOnly()

Local $aResults[11][3]
Local $aDirectX[2]

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

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

$aResults[2][0] = _CPUNameCheck(_GetCPUInfo(2))
$aResults[2][1] = @error
$aResults[2][2] = @extended

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

$aResults[4][0] = _CPUSpeedCheck()
$aResults[4][1] = @error
$aResults[4][2] = @extended

$aResults[5][0] = 0
$aResults[5][1] = @error
$aResults[5][2] = @extended

$aResults[6][0] = _GPTCheck()
$aResults[6][1] = @error
$aResults[6][2] = @extended

$aResults[7][0] = _MemCheck()
$aResults[7][1] = @error
$aResults[7][2] = @extended

$aResults[8][0] = _SecureBootCheck()
$aResults[8][1] = @error
$aResults[8][2] = @extended

$aResults[9][0] = _SpaceCheck()
$aResults[9][1] = @error
$aResults[9][2] = @extended

$aResults[10][0] = _TPMCheck()
$aResults[10][1] = @error
$aResults[10][2] = @extended

_ArrayDisplay($aResults)

EndFunc

Func ExtractFiles()
Expand Down
10 changes: 5 additions & 5 deletions includes/_Checks.au3
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Func _GetDirectXCheck($aArray)
EndIf
EndFunc

Func GPTCheck()
Func _GPTCheck()
Local $aDisks = _GetDiskInfo(1)
Switch _GetDiskInfo(0)
Case "GPT"
Expand All @@ -157,7 +157,7 @@ Func GPTCheck()
EndSwitch
EndFunc

Func MemCheck()
Func _MemCheck()
Local $aMem = DllCall("Kernel32.dll", "int", "GetPhysicallyInstalledSystemMemory", "int*", "")
If @error Then
$aMem = MemGetStats()
Expand All @@ -179,7 +179,7 @@ Func MemCheck()
EndIf
EndFunc

Func SecureBootCheck()
Func _SecureBootCheck()
Local $sSecureBoot = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot\State", "UEFISecureBootEnabled")
If @error Then $sSecureBoot = 999
Switch $sSecureBoot
Expand All @@ -192,7 +192,7 @@ Func SecureBootCheck()
EndSwitch
EndFunc

Func SpaceCheck()
Func _SpaceCheck()
Local $aDrives = DriveGetDrive($DT_FIXED)
Local $iDrives = 0

Expand All @@ -207,7 +207,7 @@ Func SpaceCheck()
EndIf
EndFunc

Func TPMCheck()
Func _TPMCheck()
Select
Case Not IsAdmin() And _GetTPMInfo(0) = True
Return True
Expand Down

0 comments on commit c8de0c0

Please sign in to comment.