mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-05-20 10:24:53 +00:00
Add TSforge and Online KMS support for Vista/Server2008
This commit is contained in:
parent
172fd7b1c5
commit
98ef9db3ce
11 changed files with 1211 additions and 281 deletions
|
@ -139,9 +139,9 @@ goto dk_done
|
|||
)
|
||||
|
||||
if %winbuild% LSS 7600 (
|
||||
%nceline%
|
||||
%eline%
|
||||
echo Unsupported OS version detected [%winbuild%].
|
||||
echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
echo This option is supported only for Windows 7/8/8.1/10/11 and their Server equivalents.
|
||||
goto dk_done
|
||||
)
|
||||
|
||||
|
@ -824,10 +824,16 @@ exit /b
|
|||
|
||||
:dk_setvar
|
||||
|
||||
set psc=powershell.exe -nop -c
|
||||
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
|
||||
set psc=%ps% -nop -c
|
||||
set winbuild=1
|
||||
for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G
|
||||
|
||||
set _slexe=sppsvc.exe& set _slser=sppsvc
|
||||
if %winbuild% LEQ 6300 (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %winbuild% LSS 7600 if exist "%SysPath%\SLsvc.exe" (set _slexe=SLsvc.exe& set _slser=SLsvc)
|
||||
if %_slexe%==SLsvc.exe set _vis=1
|
||||
|
||||
set _NCS=1
|
||||
if %winbuild% LSS 10586 set _NCS=0
|
||||
if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0)
|
||||
|
@ -911,16 +917,16 @@ exit /b
|
|||
|
||||
:dk_sppissue
|
||||
|
||||
sc start sppsvc %nul%
|
||||
sc start %_slser% %nul%
|
||||
set spperror=%errorlevel%
|
||||
|
||||
if %spperror% NEQ 1056 if %spperror% NEQ 0 (
|
||||
%eline%
|
||||
echo sc start sppsvc [Error Code: %spperror%]
|
||||
echo sc start %_slser% [Error Code: %spperror%]
|
||||
)
|
||||
|
||||
echo:
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host 'sppsvc is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 30)) {write-host '%_slser% is not working correctly. Check this webpage for help - %mas%troubleshoot'}"
|
||||
exit /b
|
||||
|
||||
:: Common lines used in PowerShell reflection code
|
||||
|
@ -1018,8 +1024,10 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[0m
|
||||
) else (
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3'
|
||||
) else if not exist %ps% (
|
||||
echo %~3
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -1027,8 +1035,10 @@ exit /b
|
|||
|
||||
if %_NCS% EQU 1 (
|
||||
echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m
|
||||
) else (
|
||||
) else if exist %ps% (
|
||||
%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6'
|
||||
) else if not exist %ps% (
|
||||
echo %~3 %~6
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue