Regex adjustment/improvement

- Code cleanup by RvdHout
- Supports at least Dutch & German OS
This commit is contained in:
illfated 2020-04-27 23:04:09 +02:00
parent e25231e6ff
commit c8766851ce

View File

@ -776,11 +776,11 @@ function CheckOSArchitecture
{ {
$OSArch = $(gwmi win32_operatingsystem).OSArchitecture.ToLower() $OSArch = $(gwmi win32_operatingsystem).OSArchitecture.ToLower()
Log $OSArch Log $OSArch
if($OSArch -match ("64\-?\s?bits?")) if($OSArch -match ("^64\-?\s?bit"))
{ {
LogAndConsoleSuccess "64 bit architecture" LogAndConsoleSuccess "64 bit architecture"
} }
elseif($OSArch -match ("32\-?\s?bits?")) elseif($OSArch -match ("^32\-?\s?bit"))
{ {
LogAndConsoleError "32 bit architecture" LogAndConsoleError "32 bit architecture"
$DGVerifyCrit.AppendLine("32 Bit OS, OS Architecture failure.") | Out-Null $DGVerifyCrit.AppendLine("32 Bit OS, OS Architecture failure.") | Out-Null