diff options
| author | WindowsAddict | 2025-02-03 18:27:37 +0000 |
|---|---|---|
| committer | WindowsAddict | 2025-02-03 18:27:37 +0000 |
| commit | 8f3f3925177b26cf21b8dbd5cad6debf0e3b2e19 (patch) | |
| tree | b48c5174688d8683c031a0349bfe3301e15bb267 /MAS | |
| parent | af69d79c5c1d05c56959a7f6266c893cb28a0cda (diff) | |
| download | Microsoft-Activation-Scripts-8f3f3925177b26cf21b8dbd5cad6debf0e3b2e19.zip | |
Add updated CAS
Diffstat (limited to 'MAS')
| -rw-r--r-- | MAS/All-In-One-Version-KL/MAS_AIO.cmd | 38 | ||||
| -rw-r--r-- | MAS/Separate-Files-Version/Check_Activation_Status.cmd | 38 |
2 files changed, 18 insertions, 58 deletions
diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 40cc675..30ebaea 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -6568,21 +6568,6 @@ if ($winbuild -LT 2600) { ExitScript 1
}
-$SysPath = "$env:SystemRoot\System32"
-if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") {
- $SysPath = "$env:SystemRoot\Sysnative"
-}
-
-if (Test-Path "$SysPath\sppc.dll") {
- $SLdll = 'sppc.dll'
-} elseif (Test-Path "$SysPath\slc.dll") {
- $SLdll = 'slc.dll'
-} else {
- "==== ERROR ====`r`n"
- "Software Licensing Client Dll is not detected."
- ExitScript 1
-}
-
if ($All.IsPresent)
{
$isAll = {CONOUT "`r"}
@@ -6977,7 +6962,7 @@ function GetResult($strSLP, $strSLS, $strID) }
}
- if ($winPR -And $Dlv -And $null -EQ $RemainingAppReArmCount) {
+ if ($winPR -And $Dlv -And $NT7 -And $null -EQ $RemainingAppReArmCount) {
try
{
$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS"
@@ -7046,14 +7031,9 @@ function GetResult($strSLP, $strSLS, $strID) $objSvc = New-Object PSObject
$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS"
$wmiSvc.Options.Rewindable = $false
- $wmiSvc.Get() | select -Expand Properties -EA 0 | foreach {
- if (-Not [String]::IsNullOrEmpty($_.Value))
- {
- $objSvc | Add-Member 8 $_.Name $_.Value
- if ($null -EQ $IsKeyManagementServiceMachine) {set $_.Name $_.Value}
- }
- }
+ $wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { if (-Not [String]::IsNullOrEmpty($_.Value)) {$objSvc | Add-Member 8 $_.Name $_.Value} }
$wmiSvc.Dispose()
+ if ($null -EQ $IsKeyManagementServiceMachine) {$objSvc.PSObject.Properties | foreach {set $_.Name $_.Value}}
}
catch
{
@@ -7164,12 +7144,7 @@ function PrintSharedComputerLicensing {
$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer }
}
- If ($null -Eq $tokenFiles)
- {
- CONOUT "No tokens found."
- Return
- }
- If ($tokenFiles.Length -Eq 0)
+ If ($null -Eq $tokenFiles -Or $tokenFiles.Length -Eq 0)
{
CONOUT "No tokens found."
Return
@@ -7518,6 +7493,11 @@ if ($All.IsPresent) { if (!$Pass.IsPresent) {clear;}
}
+$SysPath = "$env:SystemRoot\System32"
+if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") {
+ $SysPath = "$env:SystemRoot\Sysnative"
+}
+
$wslp = "SoftwareLicensingProduct"
$wsls = "SoftwareLicensingService"
$oslp = "OfficeSoftwareProtectionProduct"
diff --git a/MAS/Separate-Files-Version/Check_Activation_Status.cmd b/MAS/Separate-Files-Version/Check_Activation_Status.cmd index 52b15b7..f15f36e 100644 --- a/MAS/Separate-Files-Version/Check_Activation_Status.cmd +++ b/MAS/Separate-Files-Version/Check_Activation_Status.cmd @@ -103,21 +103,6 @@ if ($winbuild -LT 2600) { ExitScript 1
}
-$SysPath = "$env:SystemRoot\System32"
-if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") {
- $SysPath = "$env:SystemRoot\Sysnative"
-}
-
-if (Test-Path "$SysPath\sppc.dll") {
- $SLdll = 'sppc.dll'
-} elseif (Test-Path "$SysPath\slc.dll") {
- $SLdll = 'slc.dll'
-} else {
- "==== ERROR ====`r`n"
- "Software Licensing Client Dll is not detected."
- ExitScript 1
-}
-
if ($All.IsPresent)
{
$isAll = {CONOUT "`r"}
@@ -512,7 +497,7 @@ function GetResult($strSLP, $strSLS, $strID) }
}
- if ($winPR -And $Dlv -And $null -EQ $RemainingAppReArmCount) {
+ if ($winPR -And $Dlv -And $NT7 -And $null -EQ $RemainingAppReArmCount) {
try
{
$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS"
@@ -581,14 +566,9 @@ function GetResult($strSLP, $strSLS, $strID) $objSvc = New-Object PSObject
$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS"
$wmiSvc.Options.Rewindable = $false
- $wmiSvc.Get() | select -Expand Properties -EA 0 | foreach {
- if (-Not [String]::IsNullOrEmpty($_.Value))
- {
- $objSvc | Add-Member 8 $_.Name $_.Value
- if ($null -EQ $IsKeyManagementServiceMachine) {set $_.Name $_.Value}
- }
- }
+ $wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { if (-Not [String]::IsNullOrEmpty($_.Value)) {$objSvc | Add-Member 8 $_.Name $_.Value} }
$wmiSvc.Dispose()
+ if ($null -EQ $IsKeyManagementServiceMachine) {$objSvc.PSObject.Properties | foreach {set $_.Name $_.Value}}
}
catch
{
@@ -699,12 +679,7 @@ function PrintSharedComputerLicensing {
$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer }
}
- If ($null -Eq $tokenFiles)
- {
- CONOUT "No tokens found."
- Return
- }
- If ($tokenFiles.Length -Eq 0)
+ If ($null -Eq $tokenFiles -Or $tokenFiles.Length -Eq 0)
{
CONOUT "No tokens found."
Return
@@ -1053,6 +1028,11 @@ if ($All.IsPresent) { if (!$Pass.IsPresent) {clear;}
}
+$SysPath = "$env:SystemRoot\System32"
+if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") {
+ $SysPath = "$env:SystemRoot\Sysnative"
+}
+
$wslp = "SoftwareLicensingProduct"
$wsls = "SoftwareLicensingService"
$oslp = "OfficeSoftwareProtectionProduct"
|
