mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2024-11-22 07:36:40 +00:00
Increase time out
This commit is contained in:
parent
0477cf13e1
commit
9d1964ceda
@ -780,7 +780,7 @@ echo Generating GenuineTicket.xml [Successful]
|
|||||||
set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
||||||
|
|
||||||
%_xmlexist% (
|
%_xmlexist% (
|
||||||
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ echo:
|
|||||||
set error=1
|
set error=1
|
||||||
call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]"
|
call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]"
|
||||||
)
|
)
|
||||||
for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null")
|
for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 20 | Out-Null")
|
||||||
call :dk_refresh
|
call :dk_refresh
|
||||||
call :dk_act
|
call :dk_act
|
||||||
call :dk_checkperm
|
call :dk_checkperm
|
||||||
@ -918,7 +918,7 @@ reg query HKLM\SYSTEM\CurrentControlSet\Services\wuauserv\%%G %nul% || set wucor
|
|||||||
if defined wucorrupt (
|
if defined wucorrupt (
|
||||||
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
|
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
|
||||||
) else (
|
) else (
|
||||||
%psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
sc query wuauserv | find /i "RUNNING" %nul% || (
|
sc query wuauserv | find /i "RUNNING" %nul% || (
|
||||||
set wuerror=1
|
set wuerror=1
|
||||||
sc start wuauserv %nul%
|
sc start wuauserv %nul%
|
||||||
@ -1185,7 +1185,7 @@ reg delete "%ruleskey%" /v "SuppressRulesEngine" /f %nul%
|
|||||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
||||||
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; %d1%"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; %d1%"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Activation IDs from licensing files if not found through WMI
|
:: Get Activation IDs from licensing files if not found through WMI
|
||||||
@ -1254,7 +1254,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||||
@ -1425,7 +1425,7 @@ set errorcode=
|
|||||||
set checkerror=
|
set checkerror=
|
||||||
|
|
||||||
sc query %%# | find /i "RUNNING" %nul% || (
|
sc query %%# | find /i "RUNNING" %nul% || (
|
||||||
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set errorcode=!errorlevel!
|
set errorcode=!errorlevel!
|
||||||
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
||||||
)
|
)
|
||||||
@ -1614,7 +1614,7 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set error=1
|
set error=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1663,7 +1663,7 @@ set showfix=1
|
|||||||
|
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||||
@ -3930,7 +3930,7 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
|||||||
|
|
||||||
:: Stop sppsvc
|
:: Stop sppsvc
|
||||||
|
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
|
|
||||||
sc query sppsvc | find /i "STOPPED" %nul% && (
|
sc query sppsvc | find /i "STOPPED" %nul% && (
|
||||||
echo Stopping sppsvc Service [Successful]
|
echo Stopping sppsvc Service [Successful]
|
||||||
@ -3939,7 +3939,7 @@ call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
|
|||||||
)
|
)
|
||||||
|
|
||||||
%_xmlexist% (
|
%_xmlexist% (
|
||||||
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
|
|
||||||
@ -7782,7 +7782,7 @@ echo [Successful]
|
|||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo Restarting wlidsvc ^& LicenseManager services...
|
echo Restarting wlidsvc ^& LicenseManager services...
|
||||||
for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null")
|
for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 20 | Out-Null")
|
||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
@ -9667,7 +9667,7 @@ find /i "%%#" "%SystemRoot%\Temp\%list%.txt" %nul1% || (
|
|||||||
if defined _notfound (set _notfound=%%#, !_notfound!) else (set _notfound=%%#)
|
if defined _notfound (set _notfound=%%#, !_notfound!) else (set _notfound=%%#)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if defined _notfound call :dk_color %Gray% "Office !_notfound! is not in this list because old version of Office is installed."
|
if defined _notfound call :dk_color %Gray% "Office !_notfound! is not in this list because old version [%_version%] of Office is installed."
|
||||||
)
|
)
|
||||||
%line%
|
%line%
|
||||||
echo:
|
echo:
|
||||||
|
@ -543,7 +543,7 @@ echo Generating GenuineTicket.xml [Successful]
|
|||||||
set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
||||||
|
|
||||||
%_xmlexist% (
|
%_xmlexist% (
|
||||||
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ echo:
|
|||||||
set error=1
|
set error=1
|
||||||
call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]"
|
call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]"
|
||||||
)
|
)
|
||||||
for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null")
|
for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 20 | Out-Null")
|
||||||
call :dk_refresh
|
call :dk_refresh
|
||||||
call :dk_act
|
call :dk_act
|
||||||
call :dk_checkperm
|
call :dk_checkperm
|
||||||
@ -681,7 +681,7 @@ reg query HKLM\SYSTEM\CurrentControlSet\Services\wuauserv\%%G %nul% || set wucor
|
|||||||
if defined wucorrupt (
|
if defined wucorrupt (
|
||||||
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
|
call :dk_color %Red% "Checking Windows Update Registry [Corruption Found]"
|
||||||
) else (
|
) else (
|
||||||
%psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service wuauserv } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
sc query wuauserv | find /i "RUNNING" %nul% || (
|
sc query wuauserv | find /i "RUNNING" %nul% || (
|
||||||
set wuerror=1
|
set wuerror=1
|
||||||
sc start wuauserv %nul%
|
sc start wuauserv %nul%
|
||||||
@ -948,7 +948,7 @@ reg delete "%ruleskey%" /v "SuppressRulesEngine" /f %nul%
|
|||||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
||||||
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; %d1%"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; %d1%"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Activation IDs from licensing files if not found through WMI
|
:: Get Activation IDs from licensing files if not found through WMI
|
||||||
@ -1017,7 +1017,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||||
@ -1188,7 +1188,7 @@ set errorcode=
|
|||||||
set checkerror=
|
set checkerror=
|
||||||
|
|
||||||
sc query %%# | find /i "RUNNING" %nul% || (
|
sc query %%# | find /i "RUNNING" %nul% || (
|
||||||
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set errorcode=!errorlevel!
|
set errorcode=!errorlevel!
|
||||||
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
||||||
)
|
)
|
||||||
@ -1377,7 +1377,7 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set error=1
|
set error=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1426,7 +1426,7 @@ set showfix=1
|
|||||||
|
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||||
|
@ -657,7 +657,7 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml""
|
|||||||
|
|
||||||
:: Stop sppsvc
|
:: Stop sppsvc
|
||||||
|
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
|
|
||||||
sc query sppsvc | find /i "STOPPED" %nul% && (
|
sc query sppsvc | find /i "STOPPED" %nul% && (
|
||||||
echo Stopping sppsvc Service [Successful]
|
echo Stopping sppsvc Service [Successful]
|
||||||
@ -666,7 +666,7 @@ call :dk_color %Gray% "Stopping sppsvc Service [Failed]"
|
|||||||
)
|
)
|
||||||
|
|
||||||
%_xmlexist% (
|
%_xmlexist% (
|
||||||
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Restart-Service ClipSVC } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
%_xmlexist% timeout /t 2 %nul%
|
%_xmlexist% timeout /t 2 %nul%
|
||||||
|
|
||||||
@ -1075,7 +1075,7 @@ reg delete "%ruleskey%" /v "SuppressRulesEngine" /f %nul%
|
|||||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
||||||
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; %d1%"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; %d1%"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Install License files using Powershell/WMI instead of slmgr.vbs
|
:: Install License files using Powershell/WMI instead of slmgr.vbs
|
||||||
@ -1126,7 +1126,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||||
@ -1342,7 +1342,7 @@ set errorcode=
|
|||||||
set checkerror=
|
set checkerror=
|
||||||
|
|
||||||
sc query %%# | find /i "RUNNING" %nul% || (
|
sc query %%# | find /i "RUNNING" %nul% || (
|
||||||
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set errorcode=!errorlevel!
|
set errorcode=!errorlevel!
|
||||||
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
||||||
)
|
)
|
||||||
@ -1531,7 +1531,7 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set error=1
|
set error=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1580,7 +1580,7 @@ set showfix=1
|
|||||||
|
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||||
|
@ -1513,7 +1513,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||||
@ -1668,7 +1668,7 @@ set errorcode=
|
|||||||
set checkerror=
|
set checkerror=
|
||||||
|
|
||||||
sc query %%# | find /i "RUNNING" %nul% || (
|
sc query %%# | find /i "RUNNING" %nul% || (
|
||||||
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set errorcode=!errorlevel!
|
set errorcode=!errorlevel!
|
||||||
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
||||||
)
|
)
|
||||||
@ -1857,7 +1857,7 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set error=1
|
set error=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1906,7 +1906,7 @@ set showfix=1
|
|||||||
|
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||||
|
@ -2487,7 +2487,7 @@ reg delete "%ruleskey%" /v "SuppressRulesEngine" /f %nul%
|
|||||||
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);
|
||||||
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
set r2=%r1% [void]$TB.DefinePInvokeMethod('SLpTriggerServiceWorker', 'sppc.dll', 22, 1, [Int32], @([UInt32], [IntPtr], [String], [UInt32]), 1, 3);
|
||||||
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
set d1=%r2% [void]$TB.CreateType()::SLpTriggerServiceWorker(0, 0, 'reeval', 0)
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; %d1%"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; %d1%"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Install License files using Powershell/WMI instead of slmgr.vbs
|
:: Install License files using Powershell/WMI instead of slmgr.vbs
|
||||||
@ -2538,7 +2538,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
:: Get Product name (WMI/REG methods are not reliable in all conditions, hence winbrand.dll method is used)
|
||||||
@ -2754,7 +2754,7 @@ set errorcode=
|
|||||||
set checkerror=
|
set checkerror=
|
||||||
|
|
||||||
sc query %%# | find /i "RUNNING" %nul% || (
|
sc query %%# | find /i "RUNNING" %nul% || (
|
||||||
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Start-Service %%# } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set errorcode=!errorlevel!
|
set errorcode=!errorlevel!
|
||||||
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
sc query %%# | find /i "RUNNING" %nul% || set checkerror=1
|
||||||
)
|
)
|
||||||
@ -2943,7 +2943,7 @@ echo Checking SPP In IFEO [%_sppint%]
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" %nul6%') do if /i %%b NEQ 0x0 (
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "SkipRearm" /t REG_DWORD /d "0" /f %nul%
|
||||||
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
call :dk_color %Red% "Checking SkipRearm [Default 0 Value Not Found. Changing To 0]"
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null"
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null"
|
||||||
set error=1
|
set error=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -2992,7 +2992,7 @@ set showfix=1
|
|||||||
|
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 10 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
%psc% "Start-Job { Stop-Service sppsvc -force } | Wait-Job -Timeout 20 | Out-Null; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||||
if not defined apps (
|
if not defined apps (
|
||||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||||
|
@ -537,7 +537,7 @@ find /i "%%#" "%SystemRoot%\Temp\%list%.txt" %nul1% || (
|
|||||||
if defined _notfound (set _notfound=%%#, !_notfound!) else (set _notfound=%%#)
|
if defined _notfound (set _notfound=%%#, !_notfound!) else (set _notfound=%%#)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if defined _notfound call :dk_color %Gray% "Office !_notfound! is not in this list because old version of Office is installed."
|
if defined _notfound call :dk_color %Gray% "Office !_notfound! is not in this list because old version [%_version%] of Office is installed."
|
||||||
)
|
)
|
||||||
%line%
|
%line%
|
||||||
echo:
|
echo:
|
||||||
@ -1374,7 +1374,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Common lines used in PowerShell reflection code
|
:: Common lines used in PowerShell reflection code
|
||||||
|
@ -875,7 +875,7 @@ echo sc start sppsvc [Error Code: %spperror%]
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
%psc% "$job = Start-Job { (Get-WmiObject -Query 'SELECT * FROM %sps%').Version }; if (-not (Wait-Job $job -Timeout 20)) {write-host 'sppsvc is not working correctly. Help - %mas%troubleshoot'}"
|
%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. Help - %mas%troubleshoot'}"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:: Common lines used in PowerShell reflection code
|
:: Common lines used in PowerShell reflection code
|
||||||
|
@ -599,7 +599,7 @@ echo [Successful]
|
|||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo Restarting wlidsvc ^& LicenseManager services...
|
echo Restarting wlidsvc ^& LicenseManager services...
|
||||||
for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null")
|
for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 20 | Out-Null")
|
||||||
|
|
||||||
::========================================================================================================================================
|
::========================================================================================================================================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user