mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-11-11 16:59:35 +00:00
Auto select Quick repair option for Office 16.0 C2R.
Thanks to Yerong for the suggestion.
This commit is contained in:
parent
0a35a00266
commit
82f7cfe5f4
@ -16584,8 +16584,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v P
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_86=Office 15.0 C2R x86" & call :getc2rrepair c2r15repair86 integratedoffice.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_68=Office 15.0 C2R x86/x64" & call :getc2rrepair c2r15repair68 integratedoffice.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2rrepair c2r16repair86 OfficeClickToRun.exe)
|
||||
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 "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2rrepair c2r16repair68 OfficeClickToRun.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2r16repair c2r16repair86 OfficeClickToRun.exe)
|
||||
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 "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2r16repair c2r16repair68 OfficeClickToRun.exe)
|
||||
|
||||
set uwp16=
|
||||
if %winbuild% GEQ 10240 (
|
||||
@ -16627,13 +16627,11 @@ echo ________________________________________________________________
|
||||
echo:
|
||||
)
|
||||
|
||||
if %counter% EQU 0 (
|
||||
echo:
|
||||
if %counter% EQU 0 (
|
||||
echo Office ^(2010 and later^) is not installed.
|
||||
goto :repairend
|
||||
echo:
|
||||
) else (
|
||||
echo:
|
||||
) else if not defined c2r16_68 if not defined c2r16_86 (
|
||||
call :dk_color %_Yellow% "A new window will appear, in that window you need to select [Quick Repair] option."
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to continue..."
|
||||
@ -16668,8 +16666,8 @@ if defined msi16_68 if exist "%msi16repair68%" echo Running - "%msi16repair68%"
|
||||
if defined msi16_86 if exist "%msi16repair86%" echo Running - "%msi16repair86%" & "%msi16repair86%"
|
||||
if defined c2r15_68 if exist "%c2r15repair68%" echo Running - "%c2r15repair68%" REPAIRUI RERUNMODE & "%c2r15repair68%" REPAIRUI RERUNMODE
|
||||
if defined c2r15_86 if exist "%c2r15repair86%" echo Running - "%c2r15repair86%" REPAIRUI RERUNMODE & "%c2r15repair86%" REPAIRUI RERUNMODE
|
||||
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" scenario=Repair & "%c2r16repair68%" scenario=Repair
|
||||
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" scenario=Repair & "%c2r16repair86%" scenario=Repair
|
||||
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair
|
||||
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair
|
||||
|
||||
:repairend
|
||||
|
||||
@ -16689,6 +16687,13 @@ set "%1=%systemdrive%\Program Files\Microsoft Office 15\Client%%#\%2"
|
||||
)
|
||||
exit /b
|
||||
|
||||
:getc2r16repair
|
||||
|
||||
for %%# in (%_68% %_86%) do (
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %%#\ClickToRun\Configuration /v ClientFolder" %nul6%') do if exist "%%b\%2" (set "%1=%%b\%2")
|
||||
)
|
||||
exit /b
|
||||
|
||||
:getrepairsetup
|
||||
|
||||
set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe"
|
||||
|
||||
@ -945,8 +945,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v P
|
||||
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_86=Office 15.0 C2R x86" & call :getc2rrepair c2r15repair86 integratedoffice.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses\ProPlus*.xrm-ms" (set "c2r15_68=Office 15.0 C2R x86/x64" & call :getc2rrepair c2r15repair68 integratedoffice.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2rrepair c2r16repair86 OfficeClickToRun.exe)
|
||||
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 "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2rrepair c2r16repair68 OfficeClickToRun.exe)
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\ClickToRun /v InstallPath" %nul6%') do if exist "%%b\root\Licenses16\ProPlus*.xrm-ms" (set "c2r16_86=Office 16.0 C2R x86" & call :getc2r16repair c2r16repair86 OfficeClickToRun.exe)
|
||||
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 "c2r16_68=Office 16.0 C2R x86/x64" & call :getc2r16repair c2r16repair68 OfficeClickToRun.exe)
|
||||
|
||||
set uwp16=
|
||||
if %winbuild% GEQ 10240 (
|
||||
@ -988,13 +988,11 @@ echo ________________________________________________________________
|
||||
echo:
|
||||
)
|
||||
|
||||
if %counter% EQU 0 (
|
||||
echo:
|
||||
if %counter% EQU 0 (
|
||||
echo Office ^(2010 and later^) is not installed.
|
||||
goto :repairend
|
||||
echo:
|
||||
) else (
|
||||
echo:
|
||||
) else if not defined c2r16_68 if not defined c2r16_86 (
|
||||
call :dk_color %_Yellow% "A new window will appear, in that window you need to select [Quick Repair] option."
|
||||
if defined terminal (
|
||||
call :dk_color %_Yellow% "Press [0] to continue..."
|
||||
@ -1029,8 +1027,8 @@ if defined msi16_68 if exist "%msi16repair68%" echo Running - "%msi16repair68%"
|
||||
if defined msi16_86 if exist "%msi16repair86%" echo Running - "%msi16repair86%" & "%msi16repair86%"
|
||||
if defined c2r15_68 if exist "%c2r15repair68%" echo Running - "%c2r15repair68%" REPAIRUI RERUNMODE & "%c2r15repair68%" REPAIRUI RERUNMODE
|
||||
if defined c2r15_86 if exist "%c2r15repair86%" echo Running - "%c2r15repair86%" REPAIRUI RERUNMODE & "%c2r15repair86%" REPAIRUI RERUNMODE
|
||||
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" scenario=Repair & "%c2r16repair68%" scenario=Repair
|
||||
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" scenario=Repair & "%c2r16repair86%" scenario=Repair
|
||||
if defined c2r16_68 if exist "%c2r16repair68%" echo Running - "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair68%" Scenario=Repair RepairType=QuickRepair
|
||||
if defined c2r16_86 if exist "%c2r16repair86%" echo Running - "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair & "%c2r16repair86%" Scenario=Repair RepairType=QuickRepair
|
||||
|
||||
:repairend
|
||||
|
||||
@ -1050,6 +1048,13 @@ set "%1=%systemdrive%\Program Files\Microsoft Office 15\Client%%#\%2"
|
||||
)
|
||||
exit /b
|
||||
|
||||
:getc2r16repair
|
||||
|
||||
for %%# in (%_68% %_86%) do (
|
||||
for /f "skip=2 tokens=2*" %%a in ('"reg query %%#\ClickToRun\Configuration /v ClientFolder" %nul6%') do if exist "%%b\%2" (set "%1=%%b\%2")
|
||||
)
|
||||
exit /b
|
||||
|
||||
:getrepairsetup
|
||||
|
||||
set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user