@ -153,15 +153,15 @@ echo Upgrade to Windows Vista SP1 or SP2.
@@ -153,15 +153,15 @@ echo Upgrade to Windows Vista SP1 or SP2.
goto dk_done
)
if %winbuild% LSS 7600 if not exist " %SysPath% \WindowsPowerShell\v1.0\Modules " (
%nceline%
if not exist %ps% (
%nceline%
echo PowerShell is not installed in your system.
)
echo Install PowerShell 2.0 using the following URL.
if %winbuild% LSS 7600 (
echo Install PowerShell using the following URL.
echo :
echo https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
if %_unattended% == 0 start https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
)
goto dk_done
)
@ -662,13 +662,11 @@ if not exist %SysPath%\%%# (
@@ -662,13 +662,11 @@ if not exist %SysPath%\%%# (
%eline%
echo [%SysPath% \%% #] file is missing, aborting...
echo :
if not defined results (
call : dk_color %Blue% " Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options. "
call : dk_color %Blue% " After that, restart system and try activation again. "
echo :
set fixes = %fixes% %mas% troubleshoot
call : dk_color2 %Blue% " Check this webpage for help - " %_Yellow% " %mas% troubleshoot "
)
goto dk_done
)
)
@ -2003,7 +2001,6 @@ if defined fixes (
@@ -2003,7 +2001,6 @@ if defined fixes (
call : dk_color %White% " Follow ALL the ABOVE blue lines. "
call : dk_color2 %Blue% " Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore "
choice /C:10 /N
if !errorlevel! == 2 exit /b
if !errorlevel! == 1 ( for %% # in ( %fixes% ) do ( start %% #) )
)
@ -2169,6 +2166,32 @@ for %%A in (%_act% %_rem%) do (if "%%A"=="1" set _unattended=1)
@@ -2169,6 +2166,32 @@ for %%A in (%_act% %_rem%) do (if "%%A"=="1" set _unattended=1)
: :========================================================================================================================================
if %winbuild% LSS 6001 (
%nceline%
echo Unsupported OS version detected [%winbuild% ].
echo MAS only supports Windows Vista/7/8/8.1/10/11 and their Server equivalents.
if %winbuild% EQU 6000 (
echo :
echo Windows Vista RTM is not supported because Powershell cannot be installed.
echo Upgrade to Windows Vista SP1 or SP2.
)
goto dk_done
)
if not exist %ps% (
%nceline%
echo PowerShell is not installed in your system.
if %winbuild% LSS 7600 (
echo Install PowerShell using the following URL.
echo :
echo https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
if %_unattended% == 0 start https://www.catalog.update.microsoft.com/Search.aspx?q=KB968930
)
goto dk_done
)
: :========================================================================================================================================
if %_rem% == 1 goto : oh_uninstall
: oh_menu
@ -2225,13 +2248,11 @@ if not exist %SysPath%\%_slexe% (
@@ -2225,13 +2248,11 @@ if not exist %SysPath%\%_slexe% (
%eline%
echo [%SysPath% \%_slexe% ] file is missing, aborting...
echo :
if not defined results (
call : dk_color %Blue% " Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options. "
call : dk_color %Blue% " After that, restart system and try activation again. "
echo :
set fixes = %fixes% %mas% troubleshoot
call : dk_color2 %Blue% " Check this webpage for help - " %_Yellow% " %mas% troubleshoot "
)
goto dk_done
)
@ -2275,8 +2296,8 @@ set o16uwp=
@@ -2275,8 +2296,8 @@ set o16uwp=
set _68 = HKLM\SOFTWARE\Microsoft\Office
set _86 = HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = Office 2010 MSI )
%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
@ -2709,12 +2730,12 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %
@@ -2709,12 +2730,12 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %
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 o15c2r = 1& set o15c2r_reg = %_86% \15.0\ClickToRun)
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 o15c2r = 1& set o15c2r_reg = %_68% \15.0\ClickToRun)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o16msi = 1& set o16msi_reg = %_86% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o16msi = 1& set o16msi_reg = %_68% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o15msi = 1& set o15msi_reg = %_86% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o15msi = 1& set o15msi_reg = %_68% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = 1& set o14msi_reg = %_86% \14.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = 1& set o14msi_reg = %_68% \14.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o16msi = 1& set o16msi_reg = %_86% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o16msi = 1& set o16msi_reg = %_68% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o15msi = 1& set o15msi_reg = %_86% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o15msi = 1& set o15msi_reg = %_68% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = 1& set o14msi_reg = %_86% \14.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = 1& set o14msi_reg = %_68% \14.0)
exit /b
@ -4089,13 +4110,11 @@ if not exist %SysPath%\%_slexe% (
@@ -4089,13 +4110,11 @@ if not exist %SysPath%\%_slexe% (
%eline%
echo [%SysPath% \%_slexe% ] file is missing, aborting...
echo :
if not defined results (
call : dk_color %Blue% " Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options. "
call : dk_color %Blue% " After that, restart system and try activation again. "
echo :
set fixes = %fixes% %mas% troubleshoot
call : dk_color2 %Blue% " Check this webpage for help - " %_Yellow% " %mas% troubleshoot "
)
goto dk_done
)
@ -4495,8 +4514,7 @@ goto :ts_off
@@ -4495,8 +4514,7 @@ goto :ts_off
if defined esuexistsup (
echo " %tsids% " | find /i " 4220f546-f522-46df-8202-4d07afd26454 " %nul1% && (
echo " %tsids% " | find /i " 7e94be23-b161-4956-a682-146ab291774c " %nul1% || (
call : dk_color %Gray% " To get Client-ESU-Year6[4-6y] license, install updates from the below URL. "
call : dk_color %Blue% " %mas% tsforge#windows-esu "
call : dk_color %Gray% " Now update Windows to get Client-ESU-Year6[4-6y] license and activate that using this script. "
)
)
goto : ts_off
@ -4571,8 +4589,8 @@ set o14c2r=
@@ -4571,8 +4589,8 @@ set o14c2r=
set _68 = HKLM\SOFTWARE\Microsoft\Office
set _86 = HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = Office 2010 MSI )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o14msi = Office 2010 MSI )
%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
@ -5286,10 +5304,10 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %
@@ -5286,10 +5304,10 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\ClickToRun /v InstallPath" %
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 o15c2r = 1& set o15c2r_reg = %_86% \15.0\ClickToRun)
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 o15c2r = 1& set o15c2r_reg = %_68% \15.0\ClickToRun)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o16msi = 1& set o16msi_reg = %_86% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o16msi = 1& set o16msi_reg = %_68% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o15msi = 1& set o15msi_reg = %_86% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set o15msi = 1& set o15msi_reg = %_68% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o16msi = 1& set o16msi_reg = %_86% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o16msi = 1& set o16msi_reg = %_68% \16.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o15msi = 1& set o15msi_reg = %_86% \15.0)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set o15msi = 1& set o15msi_reg = %_68% \15.0)
exit /b
@ -10945,13 +10963,11 @@ if defined _fmiss (
@@ -10945,13 +10963,11 @@ if defined _fmiss (
%eline%
echo [%_fmiss% ] file is missing, aborting...
echo :
if not defined results (
call : dk_color %Blue% " Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options. "
call : dk_color %Blue% " After that, restart system and try activation again. "
echo :
set fixes = %fixes% %mas% troubleshoot
call : dk_color2 %Blue% " Check this webpage for help - " %_Yellow% " %mas% troubleshoot "
)
goto dk_done
)
@ -11777,13 +11793,11 @@ if not exist %SysPath%\%_slexe% (
@@ -11777,13 +11793,11 @@ if not exist %SysPath%\%_slexe% (
%eline%
echo [%SysPath% \%_slexe% ] file is missing, aborting...
echo :
if not defined results (
call : dk_color %Blue% " Go back to Main Menu, select Troubleshoot and run DISM Restore and SFC Scan options. "
call : dk_color %Blue% " After that, restart system and try activation again. "
echo :
set fixes = %fixes% %mas% troubleshoot
call : dk_color2 %Blue% " Check this webpage for help - " %_Yellow% " %mas% troubleshoot "
)
goto dk_done
)
@ -12456,7 +12470,7 @@ call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !
@@ -12456,7 +12470,7 @@ call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !
call : dk_color %Blue% " Make sure you are using Latest MAS script. "
) else (
call : dk_color %Red% " Checking Product In Script [!_prod! MSI Retail is not supported] "
call : dk_color %Blue% " Use Ohook option to activate it. To activate with %KS% , you need to install Volume version of Office. "
call : dk_color %Blue% " Use Ohook option to activate it. "
)
set fixes = %fixes% %mas% genuine-installation-media
call : dk_color %_Yellow% " %mas% genuine-installation-media "
@ -14974,8 +14988,8 @@ function PrintLicensesInformation
@@ -14974,8 +14988,8 @@ function PrintLicensesInformation
function vNextDiagRun
{
$fNUL = ([IO.Directory]::Exists(" ${env:LOCALAPPDATA}\Microsoft\Office\Licenses " )) -and ([IO.Directory]::GetFiles(" ${env:LOCALAPPDATA}\Microsoft\Office\Licenses " , " * " , 1).Length -GT 0)
$fDev = ([IO.Directory]::Exists(" ${env:PROGRAMDATA}\Microsoft\Office\Licenses " )) -and ([IO.Directory]::GetFiles(" ${env:PROGRAMDATA}\Microsoft\Office\Licenses " , " * " , 1).Length -GT 0)
$fNUL = ([IO.Directory]::Exists(" ${env:LOCALAPPDATA}\Microsoft\Office\Licenses " )) -and ([IO.Directory]::GetFiles(" ${env:LOCALAPPDATA}\Microsoft\Office\Licenses " , " * " , 1).Length -GE 0)
$fDev = ([IO.Directory]::Exists(" ${env:PROGRAMDATA}\Microsoft\Office\Licenses " )) -and ([IO.Directory]::GetFiles(" ${env:PROGRAMDATA}\Microsoft\Office\Licenses " , " * " , 1).Length -GE 0)
$rPID = $null -NE (GP " HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing\LicensingNext " -EA 0 | select -Expand 'property' -EA 0 | where -Filter {$_.ToLower() -like " *retail " -or $_.ToLower() -like " *volume " })
$rSCA = $null -NE (GP " HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration " -EA 0 | select -Expand " SharedComputerLicensing " -EA 0)
$rSCL = $null -NE (GP " HKLM:\SOFTWARE\Microsoft\Office\16.0\Common\Licensing " -EA 0 | select -Expand " SharedComputerLicensing " -EA 0)
@ -15242,7 +15256,7 @@ function clcGetExpireSys
@@ -15242,7 +15256,7 @@ function clcGetExpireSys
return $null
}
$rData = [DateTime]::FromFileTimeUtc ($kuser).ToString('yyyy/MM/dd:HH:mm:ss')
$rData = [DateTime]::FromFileTimeUTC ($kuser).ToString('yyyy/MM/dd:HH:mm:ss')
return $rData
}
@ -16011,12 +16025,12 @@ set _86=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
@@ -16011,12 +16025,12 @@ set _86=HKLM\SOFTWARE\Wow6432Node\Microsoft\Office
reg query %_68% \14.0\CVH /f Click2run /k %nul% && ( set " c2r14_68=Office 14.0 C2R x86/x64 " & set " c2r14repair68= " )
reg query %_86% \14.0\CVH /f Click2run /k %nul% && ( set " c2r14_86=Office 14.0 C2R x86 " & set " c2r14repair86= " )
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi14_86=Office 14.0 MSI x86 " & call : getrepairsetup msi14repair86 14)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi14_68=Office 14.0 MSI x86/x64 " & call : getrepairsetup msi14repair68 14)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi15_86=Office 15.0 MSI x86 " & call : getrepairsetup msi15repair86 15)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi15_68=Office 15.0 MSI x86/x64 " & call : getrepairsetup msi15repair68 15)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi16_86=Office 16.0 MSI x86 " & call : getrepairsetup msi16repair86 16)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\* Picker.dll " ( set " msi16_68=Office 16.0 MSI x86/x64 " & call : getrepairsetup msi16repair68 16)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi14_86=Office 14.0 MSI x86 " & call : getrepairsetup msi14repair86 14)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \14.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi14_68=Office 14.0 MSI x86/x64 " & call : getrepairsetup msi14repair68 14)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi15_86=Office 15.0 MSI x86 " & call : getrepairsetup msi15repair86 15)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \15.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi15_68=Office 15.0 MSI x86/x64 " & call : getrepairsetup msi15repair68 15)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_86% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi16_86=Office 16.0 MSI x86 " & call : getrepairsetup msi16repair86 16)
for /f " skip=2 tokens=2* " %% a in ( '"reg query %_68% \16.0\Common\InstallRoot /v Path" %nul6% ' ) do if exist " %% b\Entity Picker.dll " ( set " msi16_68=Office 16.0 MSI x86/x64 " & call : getrepairsetup msi16repair68 16)
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)
@ -18242,7 +18256,6 @@ if defined fixes (
@@ -18242,7 +18256,6 @@ if defined fixes (
call : dk_color %White% " Follow ALL the ABOVE blue lines. "
call : dk_color2 %Blue% " Press [1] to Open Support Webpage " %Gray% " Press [0] to Ignore "
choice /C:10 /N
if !errorlevel! == 2 goto : oemenu
if !errorlevel! == 1 ( for %% # in ( %fixes% ) do ( start %% #) )
)