mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-04-03 03:27:14 +08:00
Compare commits
3 Commits
b5ba36c033
...
63045afc70
Author | SHA1 | Date | |
---|---|---|---|
![]() |
63045afc70 | ||
![]() |
19c6612a47 | ||
![]() |
9e6f386819 |
@ -600,7 +600,6 @@ cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
@ -865,26 +864,17 @@ ipconfig /flushdns %nul%
|
||||
set "tls=[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;"
|
||||
|
||||
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 (
|
||||
set "d1=Add-Type -AssemblyName System.Net.Http;"
|
||||
set "d1=!d1! $client = [System.Net.Http.HttpClient]::new();"
|
||||
set "d1=!d1! $response = $client.GetAsync('https://%%#').GetAwaiter().GetResult();"
|
||||
set "d1=!d1! $response.Content.ReadAsStringAsync().GetAwaiter().GetResult()"
|
||||
%psc% "!tls! !d1!" %nul2% | findstr /i "PurchaseFD DeviceAddResponse" %nul1% || set resfail=1
|
||||
if defined resfail %psc% "!tls! !d1!"
|
||||
)
|
||||
|
||||
if not defined resfail (
|
||||
%psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST" | find /i "traceId" %nul1% || set resfail=1
|
||||
if defined resfail %psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST"
|
||||
%psc% "try { !tls! 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 (
|
||||
set error=1
|
||||
echo:
|
||||
for %%# in (
|
||||
login.live.com
|
||||
purchase.mp.microsoft.com
|
||||
|
@ -363,7 +363,6 @@ cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
@ -628,26 +627,17 @@ ipconfig /flushdns %nul%
|
||||
set "tls=[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;"
|
||||
|
||||
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 (
|
||||
set "d1=Add-Type -AssemblyName System.Net.Http;"
|
||||
set "d1=!d1! $client = [System.Net.Http.HttpClient]::new();"
|
||||
set "d1=!d1! $response = $client.GetAsync('https://%%#').GetAwaiter().GetResult();"
|
||||
set "d1=!d1! $response.Content.ReadAsStringAsync().GetAwaiter().GetResult()"
|
||||
%psc% "!tls! !d1!" %nul2% | findstr /i "PurchaseFD DeviceAddResponse" %nul1% || set resfail=1
|
||||
if defined resfail %psc% "!tls! !d1!"
|
||||
)
|
||||
|
||||
if not defined resfail (
|
||||
%psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST" | find /i "traceId" %nul1% || set resfail=1
|
||||
if defined resfail %psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST"
|
||||
%psc% "try { !tls! 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 (
|
||||
set error=1
|
||||
echo:
|
||||
for %%# in (
|
||||
login.live.com
|
||||
purchase.mp.microsoft.com
|
||||
|
Loading…
x
Reference in New Issue
Block a user