mirror of
				https://github.com/massgravel/Microsoft-Activation-Scripts.git
				synced 2025-10-30 08:01:39 +00:00 
			
		
		
		
	Add updated CAS
This commit is contained in:
		
							parent
							
								
									af69d79c5c
								
							
						
					
					
						commit
						8f3f392517
					
				
					 2 changed files with 18 additions and 58 deletions
				
			
		|  | @ -6568,21 +6568,6 @@ if ($winbuild -LT 2600) { | ||||||
| 	ExitScript 1 | 	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) | if ($All.IsPresent) | ||||||
| { | { | ||||||
| 	$isAll = {CONOUT "`r"} | 	$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 | 		try | ||||||
| 		{ | 		{ | ||||||
| 			$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS" | 			$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS" | ||||||
|  | @ -7046,14 +7031,9 @@ function GetResult($strSLP, $strSLS, $strID) | ||||||
| 		$objSvc = New-Object PSObject | 		$objSvc = New-Object PSObject | ||||||
| 		$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS" | 		$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS" | ||||||
| 		$wmiSvc.Options.Rewindable = $false | 		$wmiSvc.Options.Rewindable = $false | ||||||
| 		$wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { | 		$wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { if (-Not [String]::IsNullOrEmpty($_.Value)) {$objSvc | Add-Member 8 $_.Name $_.Value} } | ||||||
| 			if (-Not [String]::IsNullOrEmpty($_.Value)) |  | ||||||
| 			{ |  | ||||||
| 				$objSvc | Add-Member 8 $_.Name $_.Value |  | ||||||
| 				if ($null -EQ $IsKeyManagementServiceMachine) {set $_.Name $_.Value} |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 		$wmiSvc.Dispose() | 		$wmiSvc.Dispose() | ||||||
|  | 		if ($null -EQ $IsKeyManagementServiceMachine) {$objSvc.PSObject.Properties | foreach {set $_.Name $_.Value}} | ||||||
| 	} | 	} | ||||||
| 	catch | 	catch | ||||||
| 	{ | 	{ | ||||||
|  | @ -7164,12 +7144,7 @@ function PrintSharedComputerLicensing | ||||||
| 	{ | 	{ | ||||||
| 		$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer } | 		$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer } | ||||||
| 	} | 	} | ||||||
| 	If ($null -Eq $tokenFiles) | 	If ($null -Eq $tokenFiles -Or $tokenFiles.Length -Eq 0) | ||||||
| 	{ |  | ||||||
| 		CONOUT "No tokens found." |  | ||||||
| 		Return |  | ||||||
| 	} |  | ||||||
| 	If ($tokenFiles.Length -Eq 0) |  | ||||||
| 	{ | 	{ | ||||||
| 		CONOUT "No tokens found." | 		CONOUT "No tokens found." | ||||||
| 		Return | 		Return | ||||||
|  | @ -7518,6 +7493,11 @@ if ($All.IsPresent) { | ||||||
| 	if (!$Pass.IsPresent) {clear;} | 	if (!$Pass.IsPresent) {clear;} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | $SysPath = "$env:SystemRoot\System32" | ||||||
|  | if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") { | ||||||
|  | 	$SysPath = "$env:SystemRoot\Sysnative" | ||||||
|  | } | ||||||
|  | 
 | ||||||
| $wslp = "SoftwareLicensingProduct" | $wslp = "SoftwareLicensingProduct" | ||||||
| $wsls = "SoftwareLicensingService" | $wsls = "SoftwareLicensingService" | ||||||
| $oslp = "OfficeSoftwareProtectionProduct" | $oslp = "OfficeSoftwareProtectionProduct" | ||||||
|  |  | ||||||
|  | @ -103,21 +103,6 @@ if ($winbuild -LT 2600) { | ||||||
| 	ExitScript 1 | 	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) | if ($All.IsPresent) | ||||||
| { | { | ||||||
| 	$isAll = {CONOUT "`r"} | 	$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 | 		try | ||||||
| 		{ | 		{ | ||||||
| 			$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS" | 			$tmp = [wmisearcher]"SELECT RemainingWindowsReArmCount FROM $strSLS" | ||||||
|  | @ -581,14 +566,9 @@ function GetResult($strSLP, $strSLS, $strID) | ||||||
| 		$objSvc = New-Object PSObject | 		$objSvc = New-Object PSObject | ||||||
| 		$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS" | 		$wmiSvc = [wmisearcher]"SELECT * FROM $strSLS" | ||||||
| 		$wmiSvc.Options.Rewindable = $false | 		$wmiSvc.Options.Rewindable = $false | ||||||
| 		$wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { | 		$wmiSvc.Get() | select -Expand Properties -EA 0 | foreach { if (-Not [String]::IsNullOrEmpty($_.Value)) {$objSvc | Add-Member 8 $_.Name $_.Value} } | ||||||
| 			if (-Not [String]::IsNullOrEmpty($_.Value)) |  | ||||||
| 			{ |  | ||||||
| 				$objSvc | Add-Member 8 $_.Name $_.Value |  | ||||||
| 				if ($null -EQ $IsKeyManagementServiceMachine) {set $_.Name $_.Value} |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 		$wmiSvc.Dispose() | 		$wmiSvc.Dispose() | ||||||
|  | 		if ($null -EQ $IsKeyManagementServiceMachine) {$objSvc.PSObject.Properties | foreach {set $_.Name $_.Value}} | ||||||
| 	} | 	} | ||||||
| 	catch | 	catch | ||||||
| 	{ | 	{ | ||||||
|  | @ -699,12 +679,7 @@ function PrintSharedComputerLicensing | ||||||
| 	{ | 	{ | ||||||
| 		$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer } | 		$tokenFiles = Get-ChildItem -Path $tokenPath -Filter "*authString*" -Recurse | Where-Object { !$_.PSIsContainer } | ||||||
| 	} | 	} | ||||||
| 	If ($null -Eq $tokenFiles) | 	If ($null -Eq $tokenFiles -Or $tokenFiles.Length -Eq 0) | ||||||
| 	{ |  | ||||||
| 		CONOUT "No tokens found." |  | ||||||
| 		Return |  | ||||||
| 	} |  | ||||||
| 	If ($tokenFiles.Length -Eq 0) |  | ||||||
| 	{ | 	{ | ||||||
| 		CONOUT "No tokens found." | 		CONOUT "No tokens found." | ||||||
| 		Return | 		Return | ||||||
|  | @ -1053,6 +1028,11 @@ if ($All.IsPresent) { | ||||||
| 	if (!$Pass.IsPresent) {clear;} | 	if (!$Pass.IsPresent) {clear;} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | $SysPath = "$env:SystemRoot\System32" | ||||||
|  | if (Test-Path "$env:SystemRoot\Sysnative\reg.exe") { | ||||||
|  | 	$SysPath = "$env:SystemRoot\Sysnative" | ||||||
|  | } | ||||||
|  | 
 | ||||||
| $wslp = "SoftwareLicensingProduct" | $wslp = "SoftwareLicensingProduct" | ||||||
| $wsls = "SoftwareLicensingService" | $wsls = "SoftwareLicensingService" | ||||||
| $oslp = "OfficeSoftwareProtectionProduct" | $oslp = "OfficeSoftwareProtectionProduct" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 WindowsAddict
						WindowsAddict