Compare commits

..
2 Commits
Author SHA1 Message Date
WitherOrNot 05c4f881ef Revert "export-ignore"
This reverts commit 40c74d0d7f.
2026-07-04 03:56:42 -04:00
WitherOrNot 40c74d0d7f export-ignore 2026-07-04 03:51:45 -04:00
3 changed files with 48 additions and 117 deletions
+25 -58
View File
@@ -2676,10 +2676,6 @@ if not defined winserver (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Server" %nul1% && set winserver=1
)
set rdsh=
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v TSAppCompat 2^>nul') do set "edid=%%a"
if "%edid%"=="0x1" set "rdsh=1"
::========================================================================================================================================
:: Check Smart App Control
@@ -2729,9 +2725,6 @@ set "_oIntegrator=%_oRoot%\integration\integrator.exe"
if /i "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
if /i "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
call :oh_checkrdsh
if defined _rdshfail goto :dk_done
call :oh_ppcpath
echo:
@@ -2790,9 +2783,6 @@ set "_oIntegrator=%_oRoot%\integration\integrator.exe"
if /i "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
if /i "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
call :oh_checkrdsh
if defined _rdshfail goto :dk_done
call :oh_ppcpath
echo:
@@ -3136,22 +3126,6 @@ exit /b
::========================================================================================================================================
:oh_checkrdsh
set _rdshfail=
if defined winserver if defined rdsh if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set error=1
call :dk_color %Red% "Retail versions of Office cannot be activated with Ohook when running on a Remote Desktop Services host."
call :dk_color %Blue% "Go back to Main Menu, select Change Office Edition option, and change to Volume."
set _rdshfail=1
)
)
exit /b
::========================================================================================================================================
:: Some Office Retail to Volume converter tools may edit the ProductReleaseIds to add VL products. This code restores it because it may affect features.
:oh_fixprids
@@ -3440,6 +3414,19 @@ call :dk_color %_Yellow% "%mas%"
)
)
:: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server
:: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server
if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set scaIsNeeded=1
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
)
)
exit /b
::========================================================================================================================================
:oh_processmsi
@@ -5012,9 +4999,7 @@ set esuexistsup=
set esueditionlist=
set esuexistbutnosup=
if %winbuild% EQU 17763 for %%# in (EnterpriseS EnterpriseSN) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GTR 19045 for %%# in (EnterpriseS EnterpriseSN) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GEQ 19041 for %%# in (IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GTR 14393 for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set isServer=1
if /i %tsedition%==Embedded (
@@ -5064,9 +5049,6 @@ REM WindowsServer2016
REM Windows10LTSB2016
f2571710-2c24-4677-8fb5-a07d41d3c1aa_Client-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
22badfe6-7d55-4485-874b-7ec317442134_Client-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
REM Windows10LTSC2021
aacc1401-305e-4ba2-8110-5aae1894c880_Client-LTSC-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
ab8c630c-395f-4241-b08d-736fbea0e1c8_Client-LTSC-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
echo "%allapps%" | find /i "%%A" %nul1% && (
@@ -5267,10 +5249,6 @@ if not defined winserver (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Server" %nul1% && set winserver=1
)
set rdsh=
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v TSAppCompat 2^>nul') do set "edid=%%a"
if "%edid%"=="0x1" set "rdsh=1"
::========================================================================================================================================
:: Process Office UWP
@@ -5339,9 +5317,6 @@ set "_oLPath=%_oRoot%\Licenses"
set "pkeypath=%_oRoot%\Office15\pkeyconfig-office.xrm-ms"
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
call :ts_checkrdsh
if defined _rdshfail goto :dk_done
echo:
echo Processing Office... [C2R ^| %_version% ^| %_oArch%]
@@ -5384,9 +5359,6 @@ set "_oLPath=%_oRoot%\Licenses16"
set "pkeypath=%_oRoot%\Office16\pkeyconfig-office.xrm-ms"
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
call :ts_checkrdsh
if defined _rdshfail goto :dk_done
echo:
echo Processing Office... [C2R ^| %_version% %_AudienceData%^| %_oArch%]
@@ -5988,22 +5960,6 @@ exit /b
::========================================================================================================================================
:ts_checkrdsh
set _rdshfail=
if /i not %tsmethod%==KMS4k if defined rdsh if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set error=1
call :dk_color %Red% "Retail versions of Office cannot be activated with TSForge when running on a Remote Desktop Services host."
call :dk_color %Blue% "Go back to Main Menu, select Change Office Edition option, and change to Volume."
set _rdshfail=1
)
)
exit /b
::========================================================================================================================================
:ts_process
if not exist "%pkeypath%" (
@@ -6119,6 +6075,17 @@ echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
)
)
:: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server
:: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server
if /i not %tsmethod%==KMS4k if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set scaIsNeeded=1
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
)
)
exit /b
::========================================================================================================================================
@@ -598,10 +598,6 @@ if not defined winserver (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Server" %nul1% && set winserver=1
)
set rdsh=
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v TSAppCompat 2^>nul') do set "edid=%%a"
if "%edid%"=="0x1" set "rdsh=1"
::========================================================================================================================================
:: Check Smart App Control
@@ -651,9 +647,6 @@ set "_oIntegrator=%_oRoot%\integration\integrator.exe"
if /i "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
if /i "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
call :oh_checkrdsh
if defined _rdshfail goto :dk_done
call :oh_ppcpath
echo:
@@ -712,9 +705,6 @@ set "_oIntegrator=%_oRoot%\integration\integrator.exe"
if /i "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll")
if /i "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll")
call :oh_checkrdsh
if defined _rdshfail goto :dk_done
call :oh_ppcpath
echo:
@@ -1056,23 +1046,6 @@ if defined _osppPath86 set _hook86=sppc32.dll
exit /b
::========================================================================================================================================
:oh_checkrdsh
set _rdshfail=
if defined winserver if defined rdsh if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set error=1
call :dk_color %Red% "Retail versions of Office cannot be activated with Ohook when running on a Remote Desktop Services host."
call :dk_color %Blue% "Go back to Main Menu, select Change Office Edition option, and change to Volume."
set _rdshfail=1
)
)
exit /b
::========================================================================================================================================
:: Some Office Retail to Volume converter tools may edit the ProductReleaseIds to add VL products. This code restores it because it may affect features.
@@ -1363,6 +1336,17 @@ call :dk_color %_Yellow% "%mas%"
)
)
:: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server
:: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server
if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set scaIsNeeded=1
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
)
)
exit /b
::========================================================================================================================================
@@ -1105,9 +1105,7 @@ set esuexistsup=
set esueditionlist=
set esuexistbutnosup=
if %winbuild% EQU 17763 for %%# in (EnterpriseS EnterpriseSN) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GTR 19045 for %%# in (EnterpriseS EnterpriseSN) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GEQ 19041 for %%# in (IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
if %winbuild% GTR 14393 for %%# in (EnterpriseS IoTEnterpriseS IoTEnterpriseSK) do (if /i %tsedition%==%%# set isltsc=1)
if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" set isServer=1
if /i %tsedition%==Embedded (
@@ -1157,9 +1155,6 @@ REM WindowsServer2016
REM Windows10LTSB2016
f2571710-2c24-4677-8fb5-a07d41d3c1aa_Client-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
22badfe6-7d55-4485-874b-7ec317442134_Client-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
REM Windows10LTSC2021
aacc1401-305e-4ba2-8110-5aae1894c880_Client-LTSC-ESU-Year3[1-3y]_-EnterpriseS-EnterpriseSN-
ab8c630c-395f-4241-b08d-736fbea0e1c8_Client-LTSC-ESU-Year6[4-6y]_-EnterpriseS-EnterpriseSN-
) do (
for /f "tokens=1-3 delims=_" %%A in ("%%#") do (
echo "%allapps%" | find /i "%%A" %nul1% && (
@@ -1360,10 +1355,6 @@ if not defined winserver (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Server" %nul1% && set winserver=1
)
set rdsh=
for /f "tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v TSAppCompat 2^>nul') do set "edid=%%a"
if "%edid%"=="0x1" set "rdsh=1"
::========================================================================================================================================
:: Process Office UWP
@@ -1432,9 +1423,6 @@ set "_oLPath=%_oRoot%\Licenses"
set "pkeypath=%_oRoot%\Office15\pkeyconfig-office.xrm-ms"
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
call :ts_checkrdsh
if defined _rdshfail goto :dk_done
echo:
echo Processing Office... [C2R ^| %_version% ^| %_oArch%]
@@ -1477,9 +1465,6 @@ set "_oLPath=%_oRoot%\Licenses16"
set "pkeypath=%_oRoot%\Office16\pkeyconfig-office.xrm-ms"
set "_oIntegrator=%_oRoot%\integration\integrator.exe"
call :ts_checkrdsh
if defined _rdshfail goto :dk_done
echo:
echo Processing Office... [C2R ^| %_version% %_AudienceData%^| %_oArch%]
@@ -2163,22 +2148,6 @@ exit /b
::========================================================================================================================================
:ts_checkrdsh
set _rdshfail=
if /i not %tsmethod%==KMS4k if defined rdsh if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set error=1
call :dk_color %Red% "Retail versions of Office cannot be activated with TSForge when running on a Remote Desktop Services host."
call :dk_color %Blue% "Go back to Main Menu, select Change Office Edition option, and change to Volume."
set _rdshfail=1
)
)
exit /b
::========================================================================================================================================
:ts_process
if not exist "%pkeypath%" (
@@ -2294,6 +2263,17 @@ echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
)
)
:: Add SharedComputerLicensing registry key if Retail Office C2R is installed on Windows Server
:: https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/click-to-run-office-on-terminal-server
if /i not %tsmethod%==KMS4k if defined winserver if defined _config if exist "%_oLPath%\Word2019VL_KMS_Client_AE*.xrm-ms" (
echo %_oIds% | find /i "Retail" %nul1% && (
set scaIsNeeded=1
reg add %_config% /v SharedComputerLicensing /t REG_SZ /d "1" /f %nul1%
echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]"
)
)
exit /b
::========================================================================================================================================