Compare commits
No commits in common. "f32cb934dcd1331018cfd3745f942147a44e830b" and "d059952ecd10e79626da4630123c57a4f50b9808" have entirely different histories.
f32cb934dc
...
d059952ecd
|
@ -1311,6 +1311,15 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
|||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
set _corrupt=
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt (
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
|
@ -1573,12 +1582,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
:: 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.
|
||||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
if %winbuild% LSS 9200 (
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Eval WLMS Service [Found]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
|
@ -2105,14 +2116,11 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\14.0\Common\InstallRoot /v P
|
|||
%nul% reg query %_68%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
%nul% reg query %_86%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
|
||||
if %winbuild% GEQ 10240 (
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty InstallLocation)" %nul6%') do (if exist "%%a\Integration\Integrator.exe" set o16uwp=Office UWP )
|
||||
)
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.Office.Desktop"" | find /i "Office" %nul1% && set o16uwp=Office UWP
|
||||
|
||||
if not "%o14msi%%o14c2r%%o16uwp%"=="" (
|
||||
echo:
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14msi%%o14c2r%%o16uwp%]"
|
||||
if not "%o14msi%%o16uwp%"=="" call :dk_color %Blue% "Use Online KMS option to activate it."
|
||||
)
|
||||
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.MicrosoftOfficeHub"" | find /i "Office" %nul1% && (
|
||||
|
@ -2542,15 +2550,14 @@ exit /b
|
|||
|
||||
if not defined _oLPath exit /b
|
||||
|
||||
if defined _oIntegrator (
|
||||
if %oVer%==16 (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License%.16 PidKey=%key% %nul%
|
||||
) else (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License% PidKey=%key% %nul%
|
||||
)
|
||||
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% && exit /b
|
||||
)
|
||||
|
||||
:: Fallback to manual method to install licenses incase integrator.exe is not working
|
||||
|
||||
|
@ -2877,23 +2884,6 @@ reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f %
|
|||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f /reg:32 %nul%
|
||||
)
|
||||
|
||||
:: Clear vNext in UWP Office
|
||||
|
||||
if defined o16uwpapplist (
|
||||
for %%# in (%_sidlist%) do (
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||
rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\LocalCache\Local\Microsoft\Office\Licenses\" %nul%
|
||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||
set defname=DEFTEMP-%%#
|
||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Identity /f %nul%
|
||||
reg unload HKU\!defname! %nul%
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: Clear SharedComputerLicensing for office
|
||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||
|
||||
|
@ -4667,14 +4657,18 @@ call :dk_color %Gray% "Checking Ohook [Ohook activation
|
|||
:: Check unsupported office versions
|
||||
|
||||
set o14c2r=
|
||||
set o16uwp=
|
||||
|
||||
set _68=HKLM\SOFTWARE\Microsoft\Office
|
||||
set _86=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
|
||||
%nul% reg query %_68%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
%nul% reg query %_86%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
|
||||
if not "%o14c2r%"=="" (
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.Office.Desktop"" | find /i "Office" %nul1% && set o16uwp=Office UWP
|
||||
|
||||
if not "%o14c2r%%o16uwp%"=="" (
|
||||
echo:
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14c2r%]"
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14c2r%%o16uwp%]"
|
||||
)
|
||||
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.MicrosoftOfficeHub"" | find /i "Office" %nul1% && (
|
||||
|
@ -4687,13 +4681,6 @@ set ohub=1
|
|||
|
||||
call :ks_getpath
|
||||
|
||||
set o16uwp=
|
||||
set o16uwp_path=
|
||||
|
||||
if %winbuild% GEQ 10240 (
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty InstallLocation)" %nul6%') do (if exist "%%a\Integration\Integrator.exe" (set o16uwp=1&set "o16uwp_path=%%a"))
|
||||
)
|
||||
|
||||
sc query ClickToRunSvc %nul%
|
||||
set error1=%errorlevel%
|
||||
|
||||
|
@ -4714,10 +4701,10 @@ set o15c2r=
|
|||
set error=1
|
||||
)
|
||||
|
||||
if "%o16uwp%%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="" (
|
||||
if "%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="" (
|
||||
set error=1
|
||||
echo:
|
||||
if not "%o14c2r%"=="" (
|
||||
if not "%o14c2r%%o16uwp%"=="" (
|
||||
call :dk_color %Red% "Checking Supported Office Install [Not Found]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
|
@ -4734,8 +4721,8 @@ goto :ks_activate
|
|||
)
|
||||
|
||||
set multioffice=
|
||||
if not "%o16uwp%%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="1" set multioffice=1
|
||||
if not "%o14c2r%"=="" set multioffice=1
|
||||
if not "%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="1" set multioffice=1
|
||||
if not "%o14c2r%%o16uwp%"=="" set multioffice=1
|
||||
|
||||
if defined multioffice (
|
||||
echo:
|
||||
|
@ -4744,44 +4731,6 @@ call :dk_color %Gray% "Checking Multiple Office Install [Found. Recommend
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Process Office UWP
|
||||
|
||||
if not defined o16uwp goto :ks_starto15c2r
|
||||
|
||||
call :ks_reset
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
|
||||
set oVer=16
|
||||
set "_oLPath=%o16uwp_path%\Licenses16"
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty Dependencies) | Select-Object PackageFullName" %nul6%') do (set "o16uwpapplist=!o16uwpapplist! %%a")
|
||||
|
||||
echo "%o16uwpapplist%" | findstr /i "Access Excel OneNote Outlook PowerPoint Publisher SkypeForBusiness Word" %nul% && set "_oIds=O365HomePremRetail"
|
||||
|
||||
for %%# in (Project Visio) do (
|
||||
echo "%o16uwpapplist%" | findstr /i "%%#" %nul% && (
|
||||
set _lat=
|
||||
if exist "%_oLPath%\%%#Pro2024VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2024Retail " & set _lat=1
|
||||
if not defined _lat if exist "%_oLPath%\%%#Pro2021VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2021Retail " & set _lat=1
|
||||
if not defined _lat if exist "%_oLPath%\%%#Pro2019VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2019Retail " & set _lat=1
|
||||
if not defined _lat set "_oIds= !_oIds! %%#ProRetail "
|
||||
)
|
||||
)
|
||||
|
||||
set uwpinfo=%o16uwp_path:C:\Program Files\WindowsApps\Microsoft.Office.Desktop_=%
|
||||
|
||||
echo:
|
||||
echo Processing Office... [UWP ^| %uwpinfo%]
|
||||
|
||||
if not defined _oIds (
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
set error=1
|
||||
goto :ks_starto15c2r
|
||||
)
|
||||
|
||||
call :ks_process
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Process Office 15.0 C2R
|
||||
|
||||
if not defined o15c2r goto :ks_starto16c2r
|
||||
|
@ -4872,7 +4821,7 @@ if defined o16msi call :ks_processmsi 16 %o16msi_reg%
|
|||
|
||||
echo:
|
||||
call :oh_clearblock
|
||||
if "%o16msi%%o15msi%"=="" if not "%o16uwp%%o16c2r%%o15c2r%"=="" if "%keyerror%"=="0" if %_NoEditionChange%==0 call :oh_uninstkey
|
||||
if "%o16msi%%o15msi%"=="" if not "%o16c2r%%o15c2r%"=="" if "%keyerror%"=="0" if %_NoEditionChange%==0 call :oh_uninstkey
|
||||
call :oh_licrefresh
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -5039,8 +4988,6 @@ exit /b
|
|||
|
||||
:ks_osppready
|
||||
|
||||
if not defined _config exit /b
|
||||
|
||||
echo: %_config% | find /i "propertyBag" %nul1% && (
|
||||
set "_osppt=REG_DWORD"
|
||||
set "_osppready=%o15c2r_reg%"
|
||||
|
@ -6281,6 +6228,7 @@ ae2ee509-1b34-41c0-acb7-6d4650168915_33PXH-7Y6KF-2VJC9-XBBR8-HV%f%THH___4_Enterp
|
|||
b92e9980-b9d5-4821-9c94-140f632f6312_FJ82H-XT6CR-J8D7P-XQJJ2-GP%f%DD4__48_Professional
|
||||
54a09a0d-d57b-4c10-8b69-a842d6590ad5_MRPKT-YTG23-K7D7T-X2JMM-QY%f%7MG__49_ProfessionalN
|
||||
db537896-376f-48ae-a492-53d0547773d0_YBYF6-BHCR3-JPKRB-CDW7B-F9%f%BK4__65_Embedded_POSReady
|
||||
e1a8296a-db37-44d1-8cce-7bc961d59c54_XGY72-BRBBT-FF8MH-2GG8H-W7%f%KCW__65_Embedded_Standard
|
||||
aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395_73KQT-CD9G6-K7TQG-66MRP-CQ%f%22C__65_Embedded_ThinPC
|
||||
5a041529-fef8-4d07-b06f-b59b573b32d2_W82YF-2Q76Y-63HXB-FGJG9-GF%f%7QX__69_ProfessionalE
|
||||
46bbed08-9c7b-48fc-a614-95250573f4ea_C29WB-22CC8-VJ326-GHFJW-H9%f%DH4__70_EnterpriseE
|
||||
|
|
|
@ -1074,6 +1074,15 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
|||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
set _corrupt=
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt (
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
|
@ -1336,12 +1345,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
:: 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.
|
||||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
if %winbuild% LSS 9200 (
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Eval WLMS Service [Found]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
|
|
|
@ -1228,6 +1228,15 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
|||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
set _corrupt=
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt (
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
|
@ -1490,12 +1499,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
:: 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.
|
||||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
if %winbuild% LSS 9200 (
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Eval WLMS Service [Found]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
|
|
|
@ -410,14 +410,11 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\14.0\Common\InstallRoot /v P
|
|||
%nul% reg query %_68%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
%nul% reg query %_86%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
|
||||
if %winbuild% GEQ 10240 (
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty InstallLocation)" %nul6%') do (if exist "%%a\Integration\Integrator.exe" set o16uwp=Office UWP )
|
||||
)
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.Office.Desktop"" | find /i "Office" %nul1% && set o16uwp=Office UWP
|
||||
|
||||
if not "%o14msi%%o14c2r%%o16uwp%"=="" (
|
||||
echo:
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14msi%%o14c2r%%o16uwp%]"
|
||||
if not "%o14msi%%o16uwp%"=="" call :dk_color %Blue% "Use Online KMS option to activate it."
|
||||
)
|
||||
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.MicrosoftOfficeHub"" | find /i "Office" %nul1% && (
|
||||
|
@ -847,15 +844,14 @@ exit /b
|
|||
|
||||
if not defined _oLPath exit /b
|
||||
|
||||
if defined _oIntegrator (
|
||||
if %oVer%==16 (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License%.16 PidKey=%key% %nul%
|
||||
) else (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License% PidKey=%key% %nul%
|
||||
)
|
||||
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% && exit /b
|
||||
)
|
||||
|
||||
:: Fallback to manual method to install licenses incase integrator.exe is not working
|
||||
|
||||
|
@ -1182,23 +1178,6 @@ reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f %
|
|||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f /reg:32 %nul%
|
||||
)
|
||||
|
||||
:: Clear vNext in UWP Office
|
||||
|
||||
if defined o16uwpapplist (
|
||||
for %%# in (%_sidlist%) do (
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||
rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\LocalCache\Local\Microsoft\Office\Licenses\" %nul%
|
||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||
set defname=DEFTEMP-%%#
|
||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Identity /f %nul%
|
||||
reg unload HKU\!defname! %nul%
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: Clear SharedComputerLicensing for office
|
||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||
|
||||
|
@ -1554,6 +1533,15 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
|||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
set _corrupt=
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt (
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
|
@ -1816,12 +1804,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
:: 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.
|
||||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
if %winbuild% LSS 9200 (
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Eval WLMS Service [Found]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
|
|
|
@ -627,14 +627,18 @@ call :dk_color %Gray% "Checking Ohook [Ohook activation
|
|||
:: Check unsupported office versions
|
||||
|
||||
set o14c2r=
|
||||
set o16uwp=
|
||||
|
||||
set _68=HKLM\SOFTWARE\Microsoft\Office
|
||||
set _86=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
|
||||
%nul% reg query %_68%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
%nul% reg query %_86%\14.0\CVH /f Click2run /k && set o14c2r=Office 2010 C2R
|
||||
|
||||
if not "%o14c2r%"=="" (
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.Office.Desktop"" | find /i "Office" %nul1% && set o16uwp=Office UWP
|
||||
|
||||
if not "%o14c2r%%o16uwp%"=="" (
|
||||
echo:
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14c2r%]"
|
||||
call :dk_color %Red% "Checking Unsupported Office Install [ %o14c2r%%o16uwp%]"
|
||||
)
|
||||
|
||||
if %winbuild% GEQ 10240 %psc% "Get-AppxPackage -name "Microsoft.MicrosoftOfficeHub"" | find /i "Office" %nul1% && (
|
||||
|
@ -647,13 +651,6 @@ set ohub=1
|
|||
|
||||
call :ks_getpath
|
||||
|
||||
set o16uwp=
|
||||
set o16uwp_path=
|
||||
|
||||
if %winbuild% GEQ 10240 (
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty InstallLocation)" %nul6%') do (if exist "%%a\Integration\Integrator.exe" (set o16uwp=1&set "o16uwp_path=%%a"))
|
||||
)
|
||||
|
||||
sc query ClickToRunSvc %nul%
|
||||
set error1=%errorlevel%
|
||||
|
||||
|
@ -674,10 +671,10 @@ set o15c2r=
|
|||
set error=1
|
||||
)
|
||||
|
||||
if "%o16uwp%%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="" (
|
||||
if "%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="" (
|
||||
set error=1
|
||||
echo:
|
||||
if not "%o14c2r%"=="" (
|
||||
if not "%o14c2r%%o16uwp%"=="" (
|
||||
call :dk_color %Red% "Checking Supported Office Install [Not Found]"
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Installed Office [Not Found]"
|
||||
|
@ -694,8 +691,8 @@ goto :ks_activate
|
|||
)
|
||||
|
||||
set multioffice=
|
||||
if not "%o16uwp%%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="1" set multioffice=1
|
||||
if not "%o14c2r%"=="" set multioffice=1
|
||||
if not "%o16c2r%%o15c2r%%o16msi%%o15msi%%o14msi%"=="1" set multioffice=1
|
||||
if not "%o14c2r%%o16uwp%"=="" set multioffice=1
|
||||
|
||||
if defined multioffice (
|
||||
echo:
|
||||
|
@ -704,46 +701,6 @@ call :dk_color %Gray% "Checking Multiple Office Install [Found. Recommend
|
|||
|
||||
::========================================================================================================================================
|
||||
|
||||
:: Process Office UWP
|
||||
|
||||
if not defined o16uwp goto :ks_starto15c2r
|
||||
|
||||
call :ks_reset
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
|
||||
set oVer=16
|
||||
set "_oLPath=%o16uwp_path%\Licenses16"
|
||||
for /f "delims=" %%a in ('%psc% "(Get-AppxPackage -name 'Microsoft.Office.Desktop' | Select-Object -ExpandProperty Dependencies) | Select-Object PackageFullName" %nul6%') do (set "o16uwpapplist=!o16uwpapplist! %%a")
|
||||
|
||||
echo "%o16uwpapplist%" | findstr /i "Access Excel OneNote Outlook PowerPoint Publisher SkypeForBusiness Word" %nul% && set "_oIds=O365HomePremRetail"
|
||||
|
||||
for %%# in (Project Visio) do (
|
||||
echo "%o16uwpapplist%" | findstr /i "%%#" %nul% && (
|
||||
set _lat=
|
||||
if exist "%_oLPath%\%%#Pro2024VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2024Retail " & set _lat=1
|
||||
if not defined _lat if exist "%_oLPath%\%%#Pro2021VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2021Retail " & set _lat=1
|
||||
if not defined _lat if exist "%_oLPath%\%%#Pro2019VL*.xrm-ms" set "_oIds= !_oIds! %%#Pro2019Retail " & set _lat=1
|
||||
if not defined _lat set "_oIds= !_oIds! %%#ProRetail "
|
||||
)
|
||||
)
|
||||
|
||||
set uwpinfo=%o16uwp_path:C:\Program Files\WindowsApps\Microsoft.Office.Desktop_=%
|
||||
|
||||
echo:
|
||||
echo Processing Office... [UWP ^| %uwpinfo%]
|
||||
|
||||
if not defined _oIds (
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
set error=1
|
||||
goto :ks_starto15c2r
|
||||
)
|
||||
|
||||
call :ks_process
|
||||
|
||||
::========================================================================================================================================
|
||||
|
||||
:ks_starto15c2r
|
||||
|
||||
:: Process Office 15.0 C2R
|
||||
|
||||
if not defined o15c2r goto :ks_starto16c2r
|
||||
|
@ -834,7 +791,7 @@ if defined o16msi call :ks_processmsi 16 %o16msi_reg%
|
|||
|
||||
echo:
|
||||
call :oh_clearblock
|
||||
if "%o16msi%%o15msi%"=="" if not "%o16uwp%%o16c2r%%o15c2r%"=="" if "%keyerror%"=="0" if %_NoEditionChange%==0 call :oh_uninstkey
|
||||
if "%o16msi%%o15msi%"=="" if not "%o16c2r%%o15c2r%"=="" if "%keyerror%"=="0" if %_NoEditionChange%==0 call :oh_uninstkey
|
||||
call :oh_licrefresh
|
||||
|
||||
::========================================================================================================================================
|
||||
|
@ -1033,8 +990,6 @@ exit /b
|
|||
|
||||
:ks_osppready
|
||||
|
||||
if not defined _config exit /b
|
||||
|
||||
echo: %_config% | find /i "propertyBag" %nul1% && (
|
||||
set "_osppt=REG_DWORD"
|
||||
set "_osppready=%o15c2r_reg%"
|
||||
|
@ -1201,15 +1156,14 @@ exit /b
|
|||
|
||||
if not defined _oLPath exit /b
|
||||
|
||||
if defined _oIntegrator (
|
||||
if %oVer%==16 (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License%.16 PidKey=%key% %nul%
|
||||
) else (
|
||||
"!_oIntegrator!" /I /License PRIDName=%_License% PidKey=%key% %nul%
|
||||
)
|
||||
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% && exit /b
|
||||
)
|
||||
|
||||
:: Fallback to manual method to install licenses incase integrator.exe is not working
|
||||
|
||||
|
@ -1320,23 +1274,6 @@ reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f %
|
|||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Office\%%x.0\Common\Licensing" /f /reg:32 %nul%
|
||||
)
|
||||
|
||||
:: Clear vNext in UWP Office
|
||||
|
||||
if defined o16uwpapplist (
|
||||
for %%# in (%_sidlist%) do (
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%#" /v ProfileImagePath" %nul6%') do (
|
||||
rmdir /s /q "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\LocalCache\Local\Microsoft\Office\Licenses\" %nul%
|
||||
if exist "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" (
|
||||
set defname=DEFTEMP-%%#
|
||||
reg load HKU\!defname! "%%b\AppData\Local\Packages\Microsoft.Office.Desktop_8wekyb3d8bbwe\SystemAppData\Helium\User.dat" %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Licensing /f %nul%
|
||||
reg delete HKU\!defname!\Software\Microsoft\Office\16.0\Common\Identity /f %nul%
|
||||
reg unload HKU\!defname! %nul%
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: Clear SharedComputerLicensing for office
|
||||
:: https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
|
||||
|
||||
|
@ -2640,6 +2577,15 @@ for %%# in (avira.com kaspersky.com virustotal.com mcafee.com) do (
|
|||
find /i "%%#" %SysPath%\drivers\etc\hosts %nul% && set /a hcount+=1)
|
||||
if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]"
|
||||
|
||||
set wucount=0
|
||||
for %%# in (wuauserv) do (
|
||||
set _corrupt=
|
||||
for %%G in (DependOnService Description DisplayName ErrorControl ImagePath ObjectName Start Type) do if not defined _corrupt (
|
||||
reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1)
|
||||
)
|
||||
)
|
||||
if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]"
|
||||
|
||||
sc start sppsvc %nul%
|
||||
echo "%errorlevel%" | findstr "577 225" %nul% && (
|
||||
set "results=%results%[Likely File Infector]"
|
||||
|
@ -2902,12 +2848,14 @@ call :dk_color2 %Red% "Checking ClipSVC " %Blue% "[System
|
|||
:: 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.
|
||||
|
||||
if exist "%SysPath%\wlms\wlms.exe" (
|
||||
sc query wlms | find /i "RUNNING" %nul% && (
|
||||
if %winbuild% LSS 9200 (
|
||||
echo Checking Eval WLMS Service [Found]
|
||||
) else (
|
||||
call :dk_color %Red% "Checking Eval WLMS Service [Found]"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || (
|
||||
|
@ -3420,6 +3368,7 @@ ae2ee509-1b34-41c0-acb7-6d4650168915_33PXH-7Y6KF-2VJC9-XBBR8-HV%f%THH___4_Enterp
|
|||
b92e9980-b9d5-4821-9c94-140f632f6312_FJ82H-XT6CR-J8D7P-XQJJ2-GP%f%DD4__48_Professional
|
||||
54a09a0d-d57b-4c10-8b69-a842d6590ad5_MRPKT-YTG23-K7D7T-X2JMM-QY%f%7MG__49_ProfessionalN
|
||||
db537896-376f-48ae-a492-53d0547773d0_YBYF6-BHCR3-JPKRB-CDW7B-F9%f%BK4__65_Embedded_POSReady
|
||||
e1a8296a-db37-44d1-8cce-7bc961d59c54_XGY72-BRBBT-FF8MH-2GG8H-W7%f%KCW__65_Embedded_Standard
|
||||
aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395_73KQT-CD9G6-K7TQG-66MRP-CQ%f%22C__65_Embedded_ThinPC
|
||||
5a041529-fef8-4d07-b06f-b59b573b32d2_W82YF-2Q76Y-63HXB-FGJG9-GF%f%7QX__69_ProfessionalE
|
||||
46bbed08-9c7b-48fc-a614-95250573f4ea_C29WB-22CC8-VJ326-GHFJW-H9%f%DH4__70_EnterpriseE
|
||||
|
|
Loading…
Reference in New Issue