Skip to content

Commit

Permalink
2.5.0.4 (#715)
Browse files Browse the repository at this point in the history
* Correct Icons

* Bump version

* Fix CPU Family Checks

* Improve WMIC performance
  • Loading branch information
rcmaehl committed Feb 4, 2023
1 parent 5706678 commit c75df24
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
10 changes: 5 additions & 5 deletions WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#AutoIt3Wrapper_UseX64=Y
#AutoIt3Wrapper_Res_Comment=https://www.whynotwin11.org
#AutoIt3Wrapper_Res_Description=Detection Script to help identify why your PC isn't Windows 11 Release Ready. Now Supporting Update Checks!
#AutoIt3Wrapper_Res_Fileversion=2.5.0.3
#AutoIt3Wrapper_Res_Fileversion=2.5.0.4
#AutoIt3Wrapper_Res_ProductName=WhyNotWin11
#AutoIt3Wrapper_Res_ProductVersion=2.5.0.3
#AutoIt3Wrapper_Res_ProductVersion=2.5.0.4
#AutoIt3Wrapper_Res_LegalCopyright=Robert Maehl, using LGPL 3 License
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
Expand Down Expand Up @@ -289,7 +289,7 @@ Func RunChecks($sDrive = Null)
$aResults[1][1] = @error
$aResults[1][2] = @extended

$aResults[2][0] = _CPUNameCheck(_GetCPUInfo(2), _GetCPUInfo(7), _GetCPUInfo(5))
$aResults[2][0] = _CPUNameCheck(_GetCPUInfo(2), _GetCPUInfo(6), _GetCPUInfo(5))
$aResults[2][1] = @error
$aResults[2][2] = @extended

Expand Down Expand Up @@ -637,7 +637,7 @@ Func Main(ByRef $aResults, ByRef $aExtended, ByRef $aOutput)
If @Compiled Then
_SetBkSelfIcon(-1, $aColors[$iText], $aColors[$iBackground], @ScriptFullPath, 207, 24, 24)
Else
_SetBkIcon(-1, $aColors[$iText], $aColors[$iBackground], @ScriptDir & "\assets\WhyNotWin11.ico", -1, 24, 24)
_SetBkIcon(-1, $aColors[$iText], $aColors[$iBackground], @ScriptDir & "\assets\Info.ico", -1, 24, 24)
EndIf
GUICtrlSetTip(-1, $aInfo[$iRow], "", $TIP_NOICON, $TIP_CENTER)
EndIf
Expand Down Expand Up @@ -870,7 +870,7 @@ Func Main(ByRef $aResults, ByRef $aExtended, ByRef $aOutput)
GUICtrlCreateLabel(" " & _Translate($aMUI[1], "Info") & " ", 40, 20, 618, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
If @Compiled Then
GUICtrlCreateIcon(@ScriptFullPath, 208, 50, 30, 40, 40)
GUICtrlCreateIcon(@ScriptFullPath, 99, 50, 30, 40, 40)
Else
GUICtrlCreateIcon(@ScriptDir & "\assets\WhyNotWin11.ico", -1, 50, 50, 40, 40)
EndIf
Expand Down
18 changes: 11 additions & 7 deletions includes/_WMIC.au3
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Func _GetCPUInfo($iFlag = 0)
$sSpeed = $Obj_Item.MaxClockSpeed
$sArch = $Obj_Item.AddressWidth
$sVersion = $Obj_Item.Version
$sFamily = $Obj_Item.Family
$sFamily = $Obj_Item.Caption
Next

$Col_Items = $Obj_WMIService.ExecQuery('Select * from Win32_ComputerSystem')
Expand All @@ -40,11 +40,15 @@ Func _GetCPUInfo($iFlag = 0)
Else
Return 0
EndIf
EndIf
If StringInStr($vName, "@") Then
$vName = StringSplit($vName, "@", $STR_NOCOUNT)
$sSpeed = StringRegExpReplace($vName[1], "[^[:digit:]]", "") & "0"
$vName = $vName[0]
If StringInStr($vName, "@") Then
$vName = StringSplit($vName, "@", $STR_NOCOUNT)
$sSpeed = StringRegExpReplace($vName[1], "[^[:digit:]]", "") & "0"
$vName = $vName[0]
EndIf
If StringRegExp($sFamily, "[^0-9]") Then
$sFamily = StringRegExp($sFamily, "Family\s\d+\sModel", $STR_REGEXPARRAYMATCH)[0]
$sFamily = StringRegExpReplace($sFamily, "[^0-9]", "")
EndIf
EndIf
Switch $iFlag
Case 0
Expand All @@ -60,7 +64,7 @@ Func _GetCPUInfo($iFlag = 0)
Case 5
Return String($sVersion)
Case 6
Return Number($sFamily)
Return $sFamily
Case Else
Return 0
EndSwitch
Expand Down

0 comments on commit c75df24

Please sign in to comment.