mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-05-20 10:24:53 +00:00
Update WPA keys check code
This commit is contained in:
parent
69f1a206fb
commit
c4f33e96c4
6 changed files with 18 additions and 18 deletions
|
@ -2722,7 +2722,7 @@ exit /b
|
|||
$wpaKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $env:COMPUTERNAME).OpenSubKey("SYSTEM\\WPA")
|
||||
$count = 0
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
$count++
|
||||
}
|
||||
}
|
||||
|
@ -2731,7 +2731,7 @@ $minBuildNumber = 14393
|
|||
if ($osVersion.Build -ge $minBuildNumber) {
|
||||
$subkeyHashTable = @{}
|
||||
foreach ($subkeyName in $wpaKey.GetSubKeyNames()) {
|
||||
if ($subkeyName -match '.*-.*-.*-.*-.*-') {
|
||||
if ($subkeyName -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
$keyNumber = $subkeyName -replace '.*-', ''
|
||||
$subkeyHashTable[$keyNumber] = $true
|
||||
}
|
||||
|
@ -2745,7 +2745,7 @@ if ($osVersion.Build -ge $minBuildNumber) {
|
|||
}
|
||||
}
|
||||
$wpaKey.GetSubKeyNames() | ForEach-Object {
|
||||
if ($_ -match '.*-.*-.*-.*-.*-') {
|
||||
if ($_ -match '8DEC0AF1-0341-4b93-85CD-72606C2DF94C.*') {
|
||||
if ($PSVersionTable.PSVersion.Major -lt 3) {
|
||||
cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue