mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-12-24 07:53:29 +00:00
Compare commits
No commits in common. "86c86c179a539457db04dcaedbdb86a98387a929" and "69e6c9bf71a01410e341221da1d699ca6a696e2a" have entirely different histories.
86c86c179a
...
69e6c9bf71
1
LICENSE
1
LICENSE
@ -672,3 +672,4 @@ may consider it more useful to permit linking proprietary applications with
|
|||||||
the library. If this is what you want to do, use the GNU Lesser General
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License. But first, please read
|
Public License instead of this License. But first, please read
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
|||||||
@ -332,7 +332,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %
|
|||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set o16c2r=1&set o16c2r_reg=%_68%\ClickToRun)
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set o16c2r=1&set o16c2r_reg=%_68%\ClickToRun)
|
||||||
|
|
||||||
if not defined o16c2r_reg (
|
if not defined o16c2r_reg (
|
||||||
%eline%
|
echo:
|
||||||
|
echo:
|
||||||
echo Office C2R 2016 or later is not installed, which is required for this script.
|
echo Office C2R 2016 or later is not installed, which is required for this script.
|
||||||
echo Download and install Office from below URL and try again.
|
echo Download and install Office from below URL and try again.
|
||||||
echo:
|
echo:
|
||||||
@ -661,61 +662,9 @@ exit /b
|
|||||||
cls
|
cls
|
||||||
if not defined terminal mode 105, 32
|
if not defined terminal mode 105, 32
|
||||||
|
|
||||||
:: Check for Project and Visio with unsupported language
|
:: Thanks to May, aka Alex for suggesting this method
|
||||||
|
|
||||||
set projvis=
|
|
||||||
set langmatched=
|
|
||||||
echo: %Project_st% %Visio_st% | find /i "ON" %nul% && set projvis=1
|
|
||||||
echo: %targetedition% | findstr /i "Project Visio" %nul% && set projvis=1
|
|
||||||
|
|
||||||
if defined projvis (
|
|
||||||
for %%# in (
|
|
||||||
ar-sa
|
|
||||||
cs-cz
|
|
||||||
da-dk
|
|
||||||
de-de
|
|
||||||
el-gr
|
|
||||||
en-us
|
|
||||||
es-es
|
|
||||||
fi-fi
|
|
||||||
fr-fr
|
|
||||||
he-il
|
|
||||||
hu-hu
|
|
||||||
it-it
|
|
||||||
ja-jp
|
|
||||||
ko-kr
|
|
||||||
nb-no
|
|
||||||
nl-nl
|
|
||||||
pl-pl
|
|
||||||
pt-br
|
|
||||||
pt-pt
|
|
||||||
ro-ro
|
|
||||||
ru-ru
|
|
||||||
sk-sk
|
|
||||||
sl-si
|
|
||||||
sv-se
|
|
||||||
tr-tr
|
|
||||||
uk-ua
|
|
||||||
zh-cn
|
|
||||||
zh-tw
|
|
||||||
) do (
|
|
||||||
if /i "%_lang%"=="%%#" set langmatched=1
|
|
||||||
)
|
|
||||||
if not defined langmatched (
|
|
||||||
%eline%
|
|
||||||
echo %_lang% language is not available for Project/Visio apps.
|
|
||||||
echo:
|
|
||||||
call :dk_color %Blue% "Install Office in the supported language for Project/Visio from the below URL."
|
|
||||||
set fixes=%fixes% %mas%genuine-installation-media
|
|
||||||
call :dk_color %_Yellow% "%mas%genuine-installation-media"
|
|
||||||
goto :oe_goback
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
:: Thanks to @abbodi1406 for first discovering OfficeClickToRun.exe uses
|
|
||||||
:: Thanks to @may for the suggestion to use it to change edition with CDN as a source
|
|
||||||
:: OfficeClickToRun.exe with productstoadd method is used here to add editions
|
:: OfficeClickToRun.exe with productstoadd method is used here to add editions
|
||||||
:: It uses delta updates, meaning that since it's using same installed build, it will consume very less Internet
|
:: It uses delta updates, meaning that since its using same installed build, it will consume very less Internet
|
||||||
|
|
||||||
set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=Groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled"
|
set "c2rcommand="%_c2rExe%" platform=%_oArch% culture=%_lang% productstoadd=%targetedition%.16_%_lang%_x-none cdnbaseurl.16=http://officecdn.microsoft.com/pr/%_updch% baseurl.16=http://officecdn.microsoft.com/pr/%_updch% version.16=%_version% mediatype.16=CDN sourcetype.16=CDN deliverymechanism=%_updch% %targetedition%.excludedapps.16=Groove%excludelist% flt.useteamsaddon=disabled flt.usebingaddononinstall=disabled flt.usebingaddononupdate=disabled"
|
||||||
|
|
||||||
@ -732,9 +681,10 @@ set errorcode=%errorlevel%
|
|||||||
timeout /t 10 %nul%
|
timeout /t 10 %nul%
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
if %errorcode% EQU 0 (
|
|
||||||
call :dk_color %Gray% "Now run the Office activation option from the main menu."
|
call :dk_color %Gray% "Now run the Office activation option from the main menu."
|
||||||
) else (
|
|
||||||
|
if %errorcode% NEQ 0 (
|
||||||
|
echo:
|
||||||
set fixes=%fixes% %mas%troubleshoot
|
set fixes=%fixes% %mas%troubleshoot
|
||||||
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot"
|
||||||
)
|
)
|
||||||
@ -758,12 +708,14 @@ mode 98, 35
|
|||||||
set counter=0
|
set counter=0
|
||||||
for %%A in (%_oIds%) do (set /a counter+=1)
|
for %%A in (%_oIds%) do (set /a counter+=1)
|
||||||
|
|
||||||
|
for %%A in (%_oIds%) do (
|
||||||
if !counter! LEQ 1 (
|
if !counter! LEQ 1 (
|
||||||
echo:
|
echo:
|
||||||
echo Only "%_oIds%" product is installed.
|
echo Only "%%A" product is installed.
|
||||||
echo This option is available only when multiple products are installed.
|
echo This option is available only when multiple products are installed.
|
||||||
goto :oe_goback
|
goto :oe_goback
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
::===============
|
::===============
|
||||||
|
|
||||||
@ -860,7 +812,7 @@ set targetchannel=
|
|||||||
|
|
||||||
%line%
|
%line%
|
||||||
echo:
|
echo:
|
||||||
call :dk_color %Gray% "Installed update channel: %_AudienceData%, %_version%, Client: %_clversion%"
|
call :dk_color %Gray% "Installed update channel: %_AudienceData% - %_version% Client: %_clversion%"
|
||||||
call :dk_color %Gray% "Unsupported update channels are excluded from this list."
|
call :dk_color %Gray% "Unsupported update channels are excluded from this list."
|
||||||
%line%
|
%line%
|
||||||
echo:
|
echo:
|
||||||
@ -1019,10 +971,6 @@ set _c2rXml=
|
|||||||
set _c2rExe=
|
set _c2rExe=
|
||||||
set _c2rCexe=
|
set _c2rCexe=
|
||||||
set _masterxml=
|
set _masterxml=
|
||||||
set ltsc19=
|
|
||||||
set ltsc21=
|
|
||||||
set ltsc24=
|
|
||||||
set ltscfound=
|
|
||||||
|
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg% /v InstallPath" %nul6%') do (set "_oRoot=%%b\root")
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg% /v InstallPath" %nul6%') do (set "_oRoot=%%b\root")
|
||||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\Configuration /v Platform" %nul6%') do (set "_oArch=%%b")
|
for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg%\Configuration /v Platform" %nul6%') do (set "_oArch=%%b")
|
||||||
@ -1057,15 +1005,19 @@ if exist "%_cfolder%\OfficeC2RClient.exe" (
|
|||||||
set "_c2rCexe=%_cfolder%\OfficeC2RClient.exe"
|
set "_c2rCexe=%_cfolder%\OfficeC2RClient.exe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set ltsc19=
|
||||||
echo %_AudienceData% | findstr /i "LTSC\>" %nul% && set ltsc19=LTSC
|
echo %_AudienceData% | findstr /i "LTSC\>" %nul% && set ltsc19=LTSC
|
||||||
echo %_clversion% %_version% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC
|
echo %_clversion% %_version% | findstr "16.0.103 16.0.104 16.0.105" %nul% && set ltsc19=LTSC
|
||||||
|
|
||||||
|
set ltsc21=
|
||||||
echo %_AudienceData% | findstr /i "LTSC2021\>" %nul% && set ltsc21=LTSC2021
|
echo %_AudienceData% | findstr /i "LTSC2021\>" %nul% && set ltsc21=LTSC2021
|
||||||
echo %_clversion% %_version% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021
|
echo %_clversion% %_version% | findstr "16.0.14332" %nul% && set ltsc21=LTSC2021
|
||||||
|
|
||||||
|
set ltsc24=
|
||||||
echo %_AudienceData% | findstr /i "LTSC2024\>" %nul% && set ltsc24=LTSC2024
|
echo %_AudienceData% | findstr /i "LTSC2024\>" %nul% && set ltsc24=LTSC2024
|
||||||
:: LTSC 2024 build is not fixed yet
|
:: LTSC 2024 build is not fixed yet
|
||||||
|
|
||||||
|
set ltscfound=
|
||||||
if not "%ltsc19%%ltsc21%%ltsc24%"=="" set ltscfound=1
|
if not "%ltsc19%%ltsc21%%ltsc24%"=="" set ltscfound=1
|
||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user