mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-12-07 01:03:24 +08:00
Compare commits
No commits in common. "55cc6d95d10446808a36c58547cd597f5c2bc98b" and "82f7cfe5f4615b929710696cc815bb0e46fcb0e5" have entirely different histories.
55cc6d95d1
...
82f7cfe5f4
@ -2127,9 +2127,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
sc query wlms %nul%
|
if exist "%SysPath%\wlms\wlms.exe" (
|
||||||
|
|
||||||
if %errorlevel% NEQ 1060 (
|
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14967,7 +14965,6 @@ function DetectSubscription {
|
|||||||
function DetectAdbaClient
|
function DetectAdbaClient
|
||||||
{
|
{
|
||||||
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
||||||
DetectActType
|
|
||||||
CONOUT "`nAD Activation client information:"
|
CONOUT "`nAD Activation client information:"
|
||||||
CONOUT " Object Name: $ADActivationObjectName"
|
CONOUT " Object Name: $ADActivationObjectName"
|
||||||
CONOUT " Domain Name: $ADActivationObjectDN"
|
CONOUT " Domain Name: $ADActivationObjectDN"
|
||||||
@ -15058,18 +15055,17 @@ function DetectKmsHost
|
|||||||
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DetectActType
|
function DetectKmsClient
|
||||||
{
|
{
|
||||||
|
if ($win8)
|
||||||
|
{
|
||||||
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
||||||
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
||||||
|
}
|
||||||
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
||||||
}
|
|
||||||
|
|
||||||
function DetectKmsClient
|
|
||||||
{
|
|
||||||
if ($win8) {DetectActType}
|
|
||||||
CONOUT "`r"
|
CONOUT "`r"
|
||||||
if ($LicenseStatus -NE 1) {
|
if ($LicenseStatus -NE 1) {
|
||||||
CONOUT "Please activate the product in order to update KMS client information values."
|
CONOUT "Please activate the product in order to update KMS client information values."
|
||||||
@ -15317,7 +15313,6 @@ function GetResult($strSLP, $strApp, $entry)
|
|||||||
|
|
||||||
if ($win8 -And $VLActivationType -EQ 1) {
|
if ($win8 -And $VLActivationType -EQ 1) {
|
||||||
DetectAdbaClient
|
DetectAdbaClient
|
||||||
$cKmsClient = $null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($winID -And $null -NE $cAvmClient) {
|
if ($winID -And $null -NE $cAvmClient) {
|
||||||
@ -16263,7 +16258,7 @@ call :dk_color %Blue% "Rebuilding ClipSVC Licenses..."
|
|||||||
echo:
|
echo:
|
||||||
|
|
||||||
if %winbuild% LSS 10240 (
|
if %winbuild% LSS 10240 (
|
||||||
echo ClipSVC license rebuilding is supported only on Windows 10/11.
|
echo ClipSVC license rebuilding is supported only on Windows 10/11 and their Server equivalents.
|
||||||
echo Skipping...
|
echo Skipping...
|
||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
@ -16274,40 +16269,6 @@ echo Skipping...
|
|||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
|
|
||||||
set _partial=
|
|
||||||
set _keymatch=
|
|
||||||
for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT PartialProductKey FROM SoftwareLicensingProduct WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).PartialProductKey | %% {echo ('PartialProductKey='+$_)}" %nul6%') do set "_partial=%%#"
|
|
||||||
for %%# in (8HV2C QPFCT 3V66T PKCKT WXCHW 8TYMD 6F4BT 8HVX7 KD72Y 7CFBY DRR8H P39PB DYJWX MDWWW 9HKR4 M7V2X 2YV77 WT2RQ MHBPB QPF8P 2YV66 VMJ2C DJ4F6 CKFFD YY74H J8JXD BHDCD T6R4W D32MH RRK69 3PJBP) do if /i "%_partial%"=="%%#" set _keymatch=1
|
|
||||||
|
|
||||||
if not defined _keymatch (
|
|
||||||
echo HWID activation key is not installed.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
%psc% "If([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet){Exit 0}Else{Exit 1}"
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo Internet is not connected.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
set resfail=
|
|
||||||
for %%# in (
|
|
||||||
licensing.mp.microsoft.com/v7.0/licenses/content
|
|
||||||
login.live.com/ppsecure/deviceaddcredential.srf
|
|
||||||
purchase.mp.microsoft.com/v7.0/users/me/orders
|
|
||||||
) do if not defined resfail (
|
|
||||||
%psc% "try { [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black; exit 3 } }"
|
|
||||||
if !errorlevel!==3 set resfail=1
|
|
||||||
)
|
|
||||||
|
|
||||||
if defined resfail (
|
|
||||||
echo Failed to connect to licensing servers.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
echo Stopping ClipSVC service...
|
echo Stopping ClipSVC service...
|
||||||
%psc% Stop-Service ClipSVC -force %nul%
|
%psc% Stop-Service ClipSVC -force %nul%
|
||||||
timeout /t 2 %nul%
|
timeout /t 2 %nul%
|
||||||
|
|||||||
@ -1820,9 +1820,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
sc query wlms %nul%
|
if exist "%SysPath%\wlms\wlms.exe" (
|
||||||
|
|
||||||
if %errorlevel% NEQ 1060 (
|
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -2506,9 +2506,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
sc query wlms %nul%
|
if exist "%SysPath%\wlms\wlms.exe" (
|
||||||
|
|
||||||
if %errorlevel% NEQ 1060 (
|
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -3569,9 +3569,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
sc query wlms %nul%
|
if exist "%SysPath%\wlms\wlms.exe" (
|
||||||
|
|
||||||
if %errorlevel% NEQ 1060 (
|
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -3579,9 +3579,7 @@ call :dk_color %Gray% "Checking SLC/WMI SKU [Difference Found
|
|||||||
|
|
||||||
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
:: This "WLMS" service was included in previous Eval editions (which were activable) to automatically shut down the system every hour after the evaluation period expired and prevent SPPSVC from stopping.
|
||||||
|
|
||||||
sc query wlms %nul%
|
if exist "%SysPath%\wlms\wlms.exe" (
|
||||||
|
|
||||||
if %errorlevel% NEQ 1060 (
|
|
||||||
echo Checking Eval WLMS Service [Found]
|
echo Checking Eval WLMS Service [Found]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -518,7 +518,6 @@ function DetectSubscription {
|
|||||||
function DetectAdbaClient
|
function DetectAdbaClient
|
||||||
{
|
{
|
||||||
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
$propADBA | foreach { set $_ (SlGetInfoSku $licID $_) }
|
||||||
DetectActType
|
|
||||||
CONOUT "`nAD Activation client information:"
|
CONOUT "`nAD Activation client information:"
|
||||||
CONOUT " Object Name: $ADActivationObjectName"
|
CONOUT " Object Name: $ADActivationObjectName"
|
||||||
CONOUT " Domain Name: $ADActivationObjectDN"
|
CONOUT " Domain Name: $ADActivationObjectDN"
|
||||||
@ -609,18 +608,17 @@ function DetectKmsHost
|
|||||||
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
if ($null -NE $KeyManagementServiceNotificationRequests) {CONOUT " Notification: $KeyManagementServiceNotificationRequests"}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DetectActType
|
function DetectKmsClient
|
||||||
{
|
{
|
||||||
|
if ($win8)
|
||||||
|
{
|
||||||
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp + '\' + $licID) "VLActivationType"
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath + '\' + $strApp) "VLActivationType"}
|
||||||
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
if ($null -EQ $VLType) {$VLType = strGetRegistry ($SPKeyPath) "VLActivationType"}
|
||||||
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
if ($null -EQ $VLType -Or $VLType -GT 3) {$VLType = 0}
|
||||||
|
}
|
||||||
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
if ($null -NE $VLType) {CONOUT "Configured Activation Type: $($VLActTypes[$VLType])"}
|
||||||
}
|
|
||||||
|
|
||||||
function DetectKmsClient
|
|
||||||
{
|
|
||||||
if ($win8) {DetectActType}
|
|
||||||
CONOUT "`r"
|
CONOUT "`r"
|
||||||
if ($LicenseStatus -NE 1) {
|
if ($LicenseStatus -NE 1) {
|
||||||
CONOUT "Please activate the product in order to update KMS client information values."
|
CONOUT "Please activate the product in order to update KMS client information values."
|
||||||
@ -868,7 +866,6 @@ function GetResult($strSLP, $strApp, $entry)
|
|||||||
|
|
||||||
if ($win8 -And $VLActivationType -EQ 1) {
|
if ($win8 -And $VLActivationType -EQ 1) {
|
||||||
DetectAdbaClient
|
DetectAdbaClient
|
||||||
$cKmsClient = $null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($winID -And $null -NE $cAvmClient) {
|
if ($winID -And $null -NE $cAvmClient) {
|
||||||
|
|||||||
@ -619,7 +619,7 @@ call :dk_color %Blue% "Rebuilding ClipSVC Licenses..."
|
|||||||
echo:
|
echo:
|
||||||
|
|
||||||
if %winbuild% LSS 10240 (
|
if %winbuild% LSS 10240 (
|
||||||
echo ClipSVC license rebuilding is supported only on Windows 10/11.
|
echo ClipSVC license rebuilding is supported only on Windows 10/11 and their Server equivalents.
|
||||||
echo Skipping...
|
echo Skipping...
|
||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
@ -630,40 +630,6 @@ echo Skipping...
|
|||||||
goto :rebuildspptok
|
goto :rebuildspptok
|
||||||
)
|
)
|
||||||
|
|
||||||
set _partial=
|
|
||||||
set _keymatch=
|
|
||||||
for /f "tokens=2 delims==" %%# in ('%psc% "(([WMISEARCHER]'SELECT PartialProductKey FROM SoftwareLicensingProduct WHERE ApplicationID=''55c92734-d682-4d71-983e-d6ec3f16059f'' AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).PartialProductKey | %% {echo ('PartialProductKey='+$_)}" %nul6%') do set "_partial=%%#"
|
|
||||||
for %%# in (8HV2C QPFCT 3V66T PKCKT WXCHW 8TYMD 6F4BT 8HVX7 KD72Y 7CFBY DRR8H P39PB DYJWX MDWWW 9HKR4 M7V2X 2YV77 WT2RQ MHBPB QPF8P 2YV66 VMJ2C DJ4F6 CKFFD YY74H J8JXD BHDCD T6R4W D32MH RRK69 3PJBP) do if /i "%_partial%"=="%%#" set _keymatch=1
|
|
||||||
|
|
||||||
if not defined _keymatch (
|
|
||||||
echo HWID activation key is not installed.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
%psc% "If([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet){Exit 0}Else{Exit 1}"
|
|
||||||
if errorlevel 1 (
|
|
||||||
echo Internet is not connected.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
set resfail=
|
|
||||||
for %%# in (
|
|
||||||
licensing.mp.microsoft.com/v7.0/licenses/content
|
|
||||||
login.live.com/ppsecure/deviceaddcredential.srf
|
|
||||||
purchase.mp.microsoft.com/v7.0/users/me/orders
|
|
||||||
) do if not defined resfail (
|
|
||||||
%psc% "try { [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black; exit 3 } }"
|
|
||||||
if !errorlevel!==3 set resfail=1
|
|
||||||
)
|
|
||||||
|
|
||||||
if defined resfail (
|
|
||||||
echo Failed to connect to licensing servers.
|
|
||||||
echo Skipping...
|
|
||||||
goto :rebuildspptok
|
|
||||||
)
|
|
||||||
|
|
||||||
echo Stopping ClipSVC service...
|
echo Stopping ClipSVC service...
|
||||||
%psc% Stop-Service ClipSVC -force %nul%
|
%psc% Stop-Service ClipSVC -force %nul%
|
||||||
timeout /t 2 %nul%
|
timeout /t 2 %nul%
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user