From d08ed1bd389e10a1a5a40d7292b5ce7ef8d788b1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 17 Aug 2024 01:41:42 +0530 Subject: Update Troubleshoot script with 2.7 structure --- MAS/Separate-Files-Version/Troubleshoot.cmd | 378 +++++++++++++++------------- 1 file changed, 198 insertions(+), 180 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 1317df5..75fdb70 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,15 +1,12 @@ @set masver=2.6 -@setlocal DisableDelayedExpansion @echo off ::============================================================================ :: -:: This script is a part of 'Microsoft-Activation-Scripts' (MAS) project. -:: :: Homepage: mass grave[.]dev -:: Email: windowsaddict@protonmail.com +:: Email: mas.help@outlook.com :: ::============================================================================ @@ -17,26 +14,32 @@ ::======================================================================================================================================== -:: Set Path variable, it helps if it is misconfigured in the system +:: Set Environment variables, it helps if they are misconfigured in the system + +setlocal EnableExtensions +setlocal DisableDelayedExpansion + +set "PathExt=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" -set "PATH=%SystemRoot%\System32;%SystemRoot%\System32\wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\" +set "SysPath=%SystemRoot%\System32" +set "Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\" if exist "%SystemRoot%\Sysnative\reg.exe" ( -set "PATH=%SystemRoot%\Sysnative;%SystemRoot%\Sysnative\wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%PATH%" +set "SysPath=%SystemRoot%\Sysnative" +set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%" ) -:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows -:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows +set "ComSpec=%SysPath%\cmd.exe" +set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules" set "_cmdf=%~f0" for %%# in (%*) do ( if /i "%%#"=="r1" set r1=1 if /i "%%#"=="r2" set r2=1 -if /i "%%#"=="-qedit" ( -reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "1" /f %nul1% -rem check the code below admin elevation to understand why it's here -) ) +:: Re-launch the script with x64 process if it was initiated by x86 process on x64 bit Windows +:: or with ARM64 process if it was initiated by x86/ARM32 process on ARM64 Windows + if exist %SystemRoot%\Sysnative\cmd.exe if not defined r1 ( setlocal EnableDelayedExpansion start %SystemRoot%\Sysnative\cmd.exe /c ""!_cmdf!" %* r1" @@ -64,10 +67,10 @@ echo: echo Null service is not running, script may crash... echo: echo: -echo Help - %mas%troubleshoot.html +echo Help - %mas%troubleshoot echo: echo: -ping 127.0.0.1 -n 10 +ping 127.0.0.1 -n 20 ) cls @@ -76,9 +79,13 @@ cls pushd "%~dp0" >nul findstr /v "$" "%~nx0" && ( echo: -echo Error: Script either has LF line ending issue or an empty line at the end of the script is missing. +echo Error - Script either has LF line ending issue or an empty line at the end of the script is missing. +echo: +echo: +echo Help - %mas%troubleshoot +echo: echo: -ping 127.0.0.1 -n 6 >nul +ping 127.0.0.1 -n 20 >nul popd exit /b ) @@ -92,6 +99,7 @@ title Troubleshoot %masver% set _args= set _elev= +set _unattended=0 set _args=%* if defined _args set _args=%_args:"=% @@ -106,20 +114,8 @@ set "nul2=2>nul" set "nul6=2^>nul" set "nul=>nul 2>&1" -set psc=powershell.exe -set winbuild=1 -for /f "tokens=6 delims=[]. " %%G in ('ver') do set winbuild=%%G - -set _NCS=1 -if %winbuild% LSS 10586 set _NCS=0 -if %winbuild% GEQ 10586 reg query "HKCU\Console" /v ForceV2 %nul2% | find /i "0x0" %nul1% && (set _NCS=0) - -call :_colorprep - -set "nceline=echo: &echo ==== ERROR ==== &echo:" -set "eline=echo: &call :_color %Red% "==== ERROR ====" &echo:" +call :dk_setvar set "line=_________________________________________________________________________________________________" -if %~z0 GEQ 200000 (set "_exitmsg=Go back") else (set "_exitmsg=Exit") ::======================================================================================================================================== @@ -127,13 +123,7 @@ if %winbuild% LSS 7600 ( %nceline% echo Unsupported OS version detected [%winbuild%]. echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. -goto at_done -) - -for %%# in (powershell.exe) do @if "%%~$PATH:#"=="" ( -%nceline% -echo Unable to find powershell.exe in the system. -goto at_done +goto dk_done ) ::======================================================================================================================================== @@ -147,6 +137,7 @@ set "_batf=%~f0" set "_batp=%_batf:'=''%" set _PSarg="""%~f0""" -el %_args% +set _PSarg=%_PSarg:'=''% set "_ttemp=%userprofile%\AppData\Local\Temp" @@ -156,13 +147,39 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( -%nceline% +%eline% echo Script is launched from the temp folder, echo Most likely you are running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. -goto at_done +goto dk_done +) +) + +::======================================================================================================================================== + +:: Check PowerShell + +REM :PowerShellTest: $ExecutionContext.SessionState.LanguageMode :PowerShellTest: + +cmd /c "%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':PowerShellTest:\s*';iex ($f[1])"" | find /i "FullLanguage" %nul1% || ( +%eline% +cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" +echo: +cmd /c "%psc% "$ExecutionContext.SessionState.LanguageMode"" | find /i "FullLanguage" %nul1% && ( +echo Failed to run Powershell command but Powershell is working. +call :dk_color %Blue% "Check if your antivirus is blocking the script." +echo: +set fixes=%fixes% %mas%troubleshoot +call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" +) || ( +echo PowerShell is not working. Aborting... +echo If you have applied restrictions on Powershell then undo those changes. +echo: +set fixes=%fixes% %mas%fix_powershell +call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%fix_powershell" ) +goto dk_done ) ::======================================================================================================================================== @@ -170,27 +187,54 @@ goto at_done :: Elevate script as admin and pass arguments and preventing loop %nul1% fltmc || ( -if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg:'=''!\"' -verb runas" && exit /b -%nceline% +if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b +%eline% echo This script needs admin rights. echo To do so, right click on this script and select 'Run as administrator'. -goto at_done +goto dk_done ) ::======================================================================================================================================== -:: This code disables QuickEdit for this cmd.exe session only without making permanent changes to the registry -:: It is added because clicking on the script window pauses the operation and leads to the confusion that script stopped due to an error +:: Disable QuickEdit and launch from conhost.exe to avoid Terminal app -for %%# in (%_args%) do (if /i "%%#"=="-qedit" set quedit=1) +if %winbuild% GEQ 17763 ( +set terminal=1 +) else ( +set terminal= +) -reg query HKCU\Console /v QuickEdit %nul2% | find /i "0x0" %nul1% || if not defined quedit ( -reg add HKCU\Console /v QuickEdit /t REG_DWORD /d "0" /f %nul1% -start cmd.exe /c ""!_batf!" %_args% -qedit" -rem quickedit reset code is added at the starting of the script instead of here because it takes time to reflect in some cases -exit /b +:: Check if script is running in Terminal app + +set r1=$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0); +set r2=%r1% [void]$TB.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128); +set r3=%r2% [void]$TB.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128); +set d1=%r3% $hIcon = $TB.CreateType(); $hWnd = $hIcon::GetConsoleWindow(); +set d2=%d1% echo $($hIcon::SendMessageW($hWnd, 127, 0, 0) -ne [IntPtr]::Zero); + +if defined terminal ( +%psc% "%d2%" %nul2% | find /i "True" %nul1% && set terminal= +) + +if %_unattended%==1 goto :skipQE +for %%# in (%_args%) do (if /i "%%#"=="-qedit" goto :skipQE) + +if defined terminal ( +set "launchcmd=start conhost.exe %psc%" +) else ( +set "launchcmd=%psc%" ) +:: Disable QuickEdit in current session + +set "d1=$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0);" +set "d2=$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128);" +set "d3=$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128);" +set "d4=$k=$t.CreateType(); $b=$k::SetConsoleMode($k::GetStdHandle(-10), 0x0080);" + +%launchcmd% "%d1% %d2% %d3% %d4% & cmd.exe '/c' '!_PSarg! -qedit'" && (exit /b) || (set terminal=1) +:skipQE + ::======================================================================================================================================== :: Check for updates @@ -205,18 +249,19 @@ if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo You are running outdated version MAS %masver% +echo Version %masver% of MAS is outdated. echo ________________________________________________ echo: +if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) ) -cls +) ::======================================================================================================================================== @@ -231,7 +276,7 @@ if not defined desktop for /f "delims=" %%a in ('%psc% "& {write-host $([Environ if not defined desktop ( %eline% echo Desktop location was not detected, aborting... -goto at_done +goto dk_done ) setlocal EnableDelayedExpansion @@ -243,7 +288,7 @@ setlocal EnableDelayedExpansion cls color 07 title Troubleshoot %masver% -mode con cols=77 lines=30 +if not defined terminal mode 77, 30 echo: echo: @@ -251,7 +296,7 @@ echo: echo: echo: _______________________________________________________________ echo: -call :_color2 %_White% " [1] " %_Green% "Help" +call :dk_color2 %_White% " [1] " %_Green% "Help" echo: ___________________________________________________ echo: echo: [2] Dism RestoreHealth @@ -265,12 +310,12 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" choice /C:1234560 /N set _erl=%errorlevel% if %_erl%==7 exit /b -if %_erl%==6 start %mas%fix-wpa-registry.html &goto at_menu +if %_erl%==6 start %mas%fix-wpa-registry &goto at_menu if %_erl%==5 goto:retokens if %_erl%==4 goto:fixwmi if %_erl%==3 goto:sfcscan @@ -283,7 +328,7 @@ goto :at_menu :dism_rest cls -mode 98, 30 +if not defined terminal mode 98, 30 title Dism /English /Online /Cleanup-Image /RestoreHealth if %winbuild% LSS 9200 ( @@ -302,7 +347,7 @@ echo: if defined _int ( echo Checking Internet Connection [Connected] ) else ( -call :_color2 %_White% " " %Red% "Checking Internet Connection [Not connected]" +call :dk_color2 %_White% " " %Red% "Checking Internet Connection [Not connected]" ) echo %line% @@ -313,8 +358,8 @@ echo %line% echo: echo Notes: echo: -call :_color2 %_White% " - " %Gray% "Make sure the Internet is connected." -call :_color2 %_White% " - " %Gray% "Make sure the Windows update is properly working." +call :dk_color2 %_White% " - " %Gray% "Make sure the Internet is connected." +call :dk_color2 %_White% " - " %Gray% "Make sure the Windows update is properly working." echo: echo %line% echo: @@ -322,7 +367,7 @@ choice /C:09 /N /M "> [9] Continue [0] Go back : " if %errorlevel%==1 goto at_menu cls -mode 110, 30 +if not defined terminal mode 110, 30 %psc% Stop-Service TrustedInstaller -force %nul% set _time= @@ -348,7 +393,7 @@ copy /y /b "%SystemRoot%\logs\DISM\dism.log" "!desktop!\AT_Logs\RHealth_DISM_%_t ) echo: -call :_color %Gray% "CBS and DISM logs are copied to the AT_Logs folder on the dekstop." +call :dk_color %Gray% "CBS and DISM logs are copied to the AT_Logs folder on the dekstop." goto :at_back ::======================================================================================================================================== @@ -356,7 +401,7 @@ goto :at_back :sfcscan cls -mode 98, 30 +if not defined terminal mode 98, 30 title sfc /scannow echo: @@ -395,7 +440,7 @@ copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "!desktop!\AT_Logs\SFC_CBS_%_time%.lo ) echo: -call :_color %Gray% "CBS log is copied to the AT_Logs folder on the dekstop." +call :dk_color %Gray% "CBS log is copied to the AT_Logs folder on the dekstop." goto :at_back ::======================================================================================================================================== @@ -403,7 +448,7 @@ goto :at_back :retokens cls -mode con cols=125 lines=32 +if not defined terminal mode 125, 32 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=200;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" title Fix Licensing ^(ClipSVC ^+ Office vNext ^+ SPP ^+ OSPP^) @@ -422,7 +467,7 @@ echo - Clear ClipSVC, Office vNext, SPP and OSPP licenses echo - Fix SPP permissions of tokens folder and registries echo - Trigger the repair option for Office. echo: -call :_color2 %_White% " - " %Red% "Apply it only when it is necessary." +call :dk_color2 %_White% " - " %Red% "Apply it only when it is necessary." echo: echo %line% echo: @@ -439,7 +484,7 @@ cls echo: echo %line% echo: -call :_color %Blue% "Rebuilding ClipSVC Licences" +call :dk_color %Blue% "Rebuilding ClipSVC Licences" echo: if %winbuild% LSS 10240 ( @@ -468,7 +513,7 @@ if %winbuild% LEQ 10240 ( echo [Successful] ) else ( if exist "%ProgramData%\Microsoft\Windows\ClipSVC\tokens.dat" ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) else ( echo [Successful] ) @@ -487,7 +532,7 @@ echo: echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" echo Restart the system, that will delete this registry key automatically. ) || ( echo [Successful] @@ -500,7 +545,7 @@ echo Deleting a IdentityCRL Registry Key... echo [%_ident%] reg delete "%_ident%" /f %nul% reg query "%_ident%" %nul% && ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) || ( echo [Successful] ) @@ -515,7 +560,7 @@ echo Deleting Folder %ProgramData%\Microsoft\Windows\ClipSVC\ rmdir /s /q "C:\ProgramData\Microsoft\Windows\ClipSvc" %nul% if exist "%ProgramData%\Microsoft\Windows\ClipSVC\" ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) else ( echo [Successful] ) @@ -526,7 +571,7 @@ echo Rebuilding Folder %ProgramData%\Microsoft\Windows\ClipSVC\ timeout /t 3 %nul% if not exist "%ProgramData%\Microsoft\Windows\ClipSVC\" timeout /t 5 %nul% if not exist "%ProgramData%\Microsoft\Windows\ClipSVC\" ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) else ( echo [Successful] ) @@ -546,7 +591,7 @@ for %%# in (wlidsvc LicenseManager) do (%psc% Restart-Service %%# %nul%) echo: echo %line% echo: -call :_color %Blue% "Clearing Office vNext License" +call :dk_color %Blue% "Clearing Office vNext License" echo: setlocal DisableDelayedExpansion @@ -608,13 +653,13 @@ if not defined regfound echo Not Found - Office vNext Registry Keys echo: echo %line% echo: -call :_color %Blue% "Rebuilding SPP Licensing Tokens" +call :dk_color %Blue% "Rebuilding SPP Licensing Tokens" echo: call :scandat check if not defined token ( -call :_color %Red% "tokens.dat file not found." +call :dk_color %Red% "tokens.dat file not found." ) else ( echo tokens.dat file: [%token%] ) @@ -623,7 +668,7 @@ echo: set wpainfo= for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1]);" %nul6%') do (set wpainfo=%%a) echo "%wpainfo%" | find /i "Error Found" %nul% && ( -call :_color %Red% "WPA Registry Error: %wpainfo%" +call :dk_color %Red% "WPA Registry Error: %wpainfo%" ) || ( echo WPA Registry Count: %wpainfo% ) @@ -662,7 +707,7 @@ set "d=!d! Set-Acl -Path '%%A' -AclObject $acl" call :checkperms if defined permerror ( -call :_color %Red% "[Failed To Fix]" +call :dk_color %Red% "[Failed To Fix]" ) else ( echo [Successfully Fixed] ) @@ -681,7 +726,7 @@ call :scandat check if defined token ( echo: -call :_color %Red% "Failed to delete .dat files." +call :dk_color %Red% "Failed to delete .dat files." echo: ) @@ -692,14 +737,14 @@ if %errorlevel% NEQ 0 cscript //nologo %windir%\system32\slmgr.vbs /rilc %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) call :scandat check echo: if not defined token ( -call :_color %Red% "Failed to rebuilt tokens.dat file." +call :dk_color %Red% "Failed to rebuilt tokens.dat file." ) else ( echo tokens.dat file was rebuilt successfully. ) @@ -711,7 +756,7 @@ echo tokens.dat file was rebuilt successfully. echo: echo %line% echo: -call :_color %Blue% "Rebuilding OSPP Licensing Tokens" +call :dk_color %Blue% "Rebuilding OSPP Licensing Tokens" echo: sc qc osppsvc %nul% || ( @@ -723,7 +768,7 @@ goto :repairoffice call :scandatospp check if not defined token ( -call :_color %Red% "tokens.dat file not found." +call :dk_color %Red% "tokens.dat file not found." ) else ( echo tokens.dat file: [%token%] ) @@ -738,7 +783,7 @@ call :scandatospp check if defined token ( echo: -call :_color %Red% "Failed to delete .dat files." +call :dk_color %Red% "Failed to delete .dat files." echo: ) @@ -756,7 +801,7 @@ call :scandatospp check echo: if not defined token ( -call :_color %Red% "Failed to rebuilt tokens.dat file." +call :dk_color %Red% "Failed to rebuilt tokens.dat file." ) else ( echo tokens.dat file was rebuilt successfully. ) @@ -768,7 +813,7 @@ echo tokens.dat file was rebuilt successfully. echo: echo %line% echo: -call :_color %Blue% "Repairing Office Licenses" +call :dk_color %Blue% "Repairing Office Licenses" echo: for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE') do set arch=%%b @@ -857,8 +902,8 @@ goto :repairend echo: ) else ( echo: -call :_color %_Yellow% "A Window will popup, in that Window you need to select [Quick] Repair Option..." -call :_color %_Yellow% "Press any key to continue..." +call :dk_color %_Yellow% "A Window will popup, in that Window you need to select [Quick] Repair Option..." +call :dk_color %_Yellow% "Press any key to continue..." echo: pause %nul1% ) @@ -902,7 +947,7 @@ echo: echo %line% echo: echo: -call :_color %Green% "Finished" +call :dk_color %Green% "Finished" goto :at_back ::======================================================================================================================================== @@ -910,7 +955,7 @@ goto :at_back :fixwmi cls -mode 98, 34 +if not defined terminal mode 98, 34 title Fix WMI :: https://techcommunity.microsoft.com/t5/ask-the-performance-team/wmi-repository-corruption-or-not/ba-p/375484 @@ -945,7 +990,7 @@ echo No need to apply this option. Aborting... goto :at_back ) -call :_color %Red% "[Not Responding]" +call :dk_color %Red% "[Not Responding]" set _corrupt= sc start Winmgmt %nul% @@ -965,7 +1010,7 @@ sc config Winmgmt start= disabled %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( -call :_color %Red% "[Failed] Aborting..." +call :dk_color %Red% "[Failed] Aborting..." sc config Winmgmt start= auto %nul% goto :at_back ) @@ -978,9 +1023,9 @@ echo Stopping Winmgmt service sc query Winmgmt | find /i "STOPPED" %nul% && ( echo [Successful] ) || ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" echo: -call :_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again." +call :dk_color %Blue% "Its recommended to select [Restart] option and then apply Fix WMI option again." echo %line% echo: choice /C:21 /N /M "> [1] Restart [2] Revert Back Changes :" @@ -995,7 +1040,7 @@ echo: echo Deleting WMI repository rmdir /s /q "%windir%\System32\wbem\repository\" %nul% if exist "%windir%\System32\wbem\repository\" ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) else ( echo [Successful] ) @@ -1006,14 +1051,14 @@ sc config Winmgmt start= auto %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( -call :_color %Red% "[Failed]" +call :dk_color %Red% "[Failed]" ) call :checkwmi if not defined error ( echo: echo Checking WMI -call :_color %Green% "[Working]" +call :dk_color %Green% "[Working]" goto :at_back ) @@ -1025,11 +1070,11 @@ echo: echo Checking WMI call :checkwmi if defined error ( -call :_color %Red% "[Not Responding]" +call :dk_color %Red% "[Not Responding]" echo: echo Run [Dism RestoreHealth] and [SFC Scannow] options and make sure there are no errors. ) else ( -call :_color %Green% "[Working]" +call :dk_color %Green% "[Working]" ) goto :at_back @@ -1077,21 +1122,12 @@ exit /b echo: echo %line% echo: -call :_color %_Yellow% "Press any key to go back..." +call :dk_color %_Yellow% "Press any key to go back..." pause %nul1% goto :at_menu ::======================================================================================================================================== -:at_done - -echo: -echo Press any key to %_exitmsg%... -pause %nul1% -exit /b - -::======================================================================================================================================== - :compresslog :: https://stackoverflow.com/a/46268232 @@ -1262,106 +1298,88 @@ $key.SetAccessControl($acl) ::======================================================================================================================================== -:_color +:dk_done + +echo: +if defined fixes ( +call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +choice /C:10 /N +if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) +) + +if defined terminal ( +call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +choice /c 0 /n +) else ( +call :dk_color %_Yellow% "Press any key to %_exitmsg%..." +pause %nul1% +) +exit /b + +::======================================================================================================================================== + +:dk_color if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[0m ) else ( -call :batcol %~1 "%~2" +if not exist %psc% (echo %~3) else (%psc% write-host -back '%1' -fore '%2' '%3') ) exit /b -:_color2 +:dk_color2 if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m ) else ( -call :batcol %~1 "%~2" %~3 "%~4" +if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6') ) exit /b -::======================================= - -:: Colored text with pure batch method -:: Thanks to @dbenham and @jeb -:: stackoverflow.com/a/10407642 - -:batcol - -pushd %_coltemp% -if not exist "'" ("'" set /p "=.") -setlocal -set "s=%~2" -set "t=%~4" -call :_batcol %1 s %3 t -del /f /q "'" -del /f /q "`.txt" -popd -exit /b +::======================================================================================================================================== -:_batcol +:: Set variables -setlocal EnableDelayedExpansion -set "s=!%~2!" -set "t=!%~4!" -for /f delims^=^ eol^= %%i in ("!s!") do ( - if "!" equ "" setlocal DisableDelayedExpansion - >`.txt (echo %%i\..\') - findstr /a:%~1 /f:`.txt "." - `.txt (echo %%i\..\') - findstr /a:%~3 /f:`.txt "." - [9] Continue [0] Go back : " if %errorlevel%==1 goto at_menu cls +for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time=%%a + %psc% Stop-Service TrustedInstaller -force %nul% -set _time= -for /f %%a in ('%psc% "Get-Date -format HH_mm_ss"') do set _time=%%a +copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "%SystemRoot%\logs\cbs\backup_cbs_%_time%.log" %nul% +del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul% + echo: echo Applying the command, echo sfc /scannow sfc /scannow -%psc% Stop-Service TrustedInstaller -force %nul% +timeout /t 5 %nul1% +copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "%SystemRoot%\logs\cbs\cbs_%_time%.log" %nul% if not exist "!desktop!\AT_Logs\" md "!desktop!\AT_Logs\" %nul% - -call :compresslog cbs\CBS.log SFC_CBS %nul% +call :compresslog cbs\cbs_%_time%.log AT_Logs\SFC_CBS %nul% if not exist "!desktop!\AT_Logs\SFC_CBS_%_time%.cab" ( copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "!desktop!\AT_Logs\SFC_CBS_%_time%.log" %nul% ) echo: -call :dk_color %Gray% "CBS log is copied to the AT_Logs folder on the dekstop." +call :dk_color %Gray% "CBS log is copied to the AT_Logs folder on the desktop." goto :at_back ::======================================================================================================================================== @@ -1154,7 +1164,7 @@ echo/.set UniqueFiles=ON>>%ddf% for /f "tokens=* delims=" %%D in ('dir /a:-D/b/s "%SystemRoot%\logs\%1"') do ( echo/"%%~fD" /inf=no;>>%ddf% ) -makecab /F %ddf% /D DiskDirectory1="" /D CabinetNameTemplate="!desktop!\AT_Logs\%2_%_time%.cab" +makecab /F %ddf% /D DiskDirectory1="" /D CabinetNameTemplate="!desktop!\%2_%_time%.cab" del /q /f %ddf% exit /b -- cgit v1.2.3 From bc5efae19d9b10efcdb1777489c03f4eaacf5f7e Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 17 Aug 2024 07:08:19 +0530 Subject: Remove Office vNext cleaning code Its already there in activation scripts --- MAS/Separate-Files-Version/Troubleshoot.cmd | 81 ++++------------------------- 1 file changed, 10 insertions(+), 71 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index d0956fb..72b7b2c 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -458,8 +458,10 @@ goto :at_back :retokens cls -if not defined terminal mode 125, 32 +if not defined terminal ( +mode 125, 32 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=200;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" +) title Fix Licensing ^(ClipSVC ^+ Office vNext ^+ SPP ^+ OSPP^) echo: @@ -500,13 +502,13 @@ echo: if %winbuild% LSS 10240 ( echo ClipSVC Licence rebuilding is supported only on Win 10/11 and Server equivalent. echo Skipping... -goto :cleanvnext +goto :rebuildspptok ) -%psc% "(([WMISEARCHER]'SELECT Name FROM SoftwareLicensingProduct WHERE LicenseStatus=1 AND GracePeriodRemaining=0 AND PartialProductKey IS NOT NULL').Get()).Name" %nul2% | findstr /i "Windows" %nul1% && ( +%psc% "(([WMISEARCHER]'SELECT Name FROM SoftwareLicensingProduct WHERE LicenseStatus=1 AND GracePeriodRemaining=0 AND PartialProductKey IS NOT NULL AND LicenseDependsOn is NULL').Get()).Name" %nul2% | findstr /i "Windows" %nul1% && ( echo Windows is permanently activated. -echo Skipping rebuilding ClipSVC licences... -goto :cleanvnext +echo Skipping... +goto :rebuildspptok ) echo Stopping ClipSVC service... @@ -589,77 +591,14 @@ echo [Successful] echo: echo Restarting [wlidsvc LicenseManager] services... -for %%# in (wlidsvc LicenseManager) do (%psc% Restart-Service %%# %nul%) - -::======================================================================================================================================== - -:: Find remnants of Office vNext license block and remove it because it stops non vNext licenses from appearing -:: https://learn.microsoft.com/en-us/office/troubleshoot/activation/reset-office-365-proplus-activation-state - -:cleanvnext - -echo: -echo %line% -echo: -call :dk_color %Blue% "Clearing Office vNext License" -echo: - -setlocal DisableDelayedExpansion -set "_Local=%LocalAppData%" -setlocal EnableDelayedExpansion - -attrib -R "!ProgramData!\Microsoft\Office\Licenses" %nul% -attrib -R "!_Local!\Microsoft\Office\Licenses" %nul% - -if exist "!ProgramData!\Microsoft\Office\Licenses\" ( -rd /s /q "!ProgramData!\Microsoft\Office\Licenses\" %nul% -if exist "!ProgramData!\Microsoft\Office\Licenses\" ( -echo Failed To Delete - !ProgramData!\Microsoft\Office\Licenses\ -) else ( -echo Deleted Folder - !ProgramData!\Microsoft\Office\Licenses\ -) -) else ( -echo Not Found - !ProgramData!\Microsoft\Office\Licenses\ -) - -if exist "!_Local!\Microsoft\Office\Licenses\" ( -rd /s /q "!_Local!\Microsoft\Office\Licenses\" %nul% -if exist "!_Local!\Microsoft\Office\Licenses\" ( -echo Failed To Delete - !_Local!\Microsoft\Office\Licenses\ -) else ( -echo Deleted Folder - !_Local!\Microsoft\Office\Licenses\ -) -) else ( -echo Not Found - !_Local!\Microsoft\Office\Licenses\ -) - - -echo: -for /f "tokens=* delims=" %%a in ('%psc% "Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList' | ForEach-Object { Split-Path -Path $_.PSPath -Leaf }" %nul6%') do (if defined _sid (set "_sid=!_sid! HKU\%%a") else (set "_sid=HKU\%%a")) - -set regfound= -for %%# in (HKCU !_sid!) do ( -for %%A in ( -%%#\Software\Microsoft\Office\16.0\Common\Licensing -%%#\Software\Microsoft\Office\16.0\Common\Identity -%%#\Software\Microsoft\Office\16.0\Registration -) do ( -reg query %%A %nul% && ( -set regfound=1 -reg delete %%A /f %nul% && ( -echo Deleted Registry - %%A -) || ( -echo Failed to Delete - %%A -) -) -) -) -if not defined regfound echo Not Found - Office vNext Registry Keys +for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null") ::======================================================================================================================================== :: Rebuild SPP Tokens +:rebuildspptok + echo: echo %line% echo: -- cgit v1.2.3 From 73eabbff59964ef0386c014e5256d33981211f1a Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 17 Aug 2024 07:17:04 +0530 Subject: Remove WPA check Already present in activation scripts --- MAS/Separate-Files-Version/Troubleshoot.cmd | 47 ----------------------------- 1 file changed, 47 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 72b7b2c..27070aa 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -613,15 +613,6 @@ call :dk_color %Red% "tokens.dat file not found." echo tokens.dat file: [%token%] ) -echo: -set wpainfo= -for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1]);" %nul6%') do (set wpainfo=%%a) -echo "%wpainfo%" | find /i "Error Found" %nul% && ( -call :dk_color %Red% "WPA Registry Error: %wpainfo%" -) || ( -echo WPA Registry Count: %wpainfo% -) - set tokenstore= for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" @@ -1109,44 +1100,6 @@ exit /b ::======================================================================================================================================== -:: This code checks for invalid registry keys in HKLM\SYSTEM\WPA. This issue may appear even on healthy systems - -:wpatest: -$wpaKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 'Registry64').OpenSubKey("SYSTEM\\WPA") -$count = $wpaKey.SubKeyCount - -$osVersion = [System.Environment]::OSVersion.Version -$minBuildNumber = 14393 - -if ($osVersion.Build -ge $minBuildNumber) { - $subkeyHashTable = @{} - foreach ($subkeyName in $wpaKey.GetSubKeyNames()) { - $keyNumber = $subkeyName -replace '.*-', '' - $subkeyHashTable[$keyNumber] = $true - } - for ($i=1; $i -le $count; $i++) { - if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Host "Total Keys $count. Error Found- $i key does not exist" - $wpaKey.Close() - exit - } - } -} -$wpaKey.GetSubKeyNames() | ForEach-Object { - $subkey = $wpaKey.OpenSubKey($_) - $p = $subkey.GetValueNames() - if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" - $wpaKey.Close() - exit - } -} -$count -$wpaKey.Close() -:wpatest: - -::======================================================================================================================================== - :checkperms set permerror= -- cgit v1.2.3 From a62c3ac36d528343ca121b478c005175e86c73ce Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 Aug 2024 03:44:07 +0530 Subject: Optimize checks and fixes for SPP perms, replace slmgr /rilc --- MAS/Separate-Files-Version/Troubleshoot.cmd | 206 +++++++++++++++++++++++----- 1 file changed, 169 insertions(+), 37 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 27070aa..415f204 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -462,7 +462,7 @@ if not defined terminal ( mode 125, 32 %psc% "&{$W=$Host.UI.RawUI.WindowSize;$B=$Host.UI.RawUI.BufferSize;$W.Height=31;$B.Height=200;$Host.UI.RawUI.WindowSize=$W;$Host.UI.RawUI.BufferSize=$B;}" ) -title Fix Licensing ^(ClipSVC ^+ Office vNext ^+ SPP ^+ OSPP^) +title Fix Licensing ^(ClipSVC ^+ SPP ^+ OSPP^) echo: echo %line% @@ -475,7 +475,7 @@ echo - This option will, echo - Deactivate Windows and Office, you may need to reactivate echo If Windows is activated with motherboard / OEM / Digital license then don't worry echo: -echo - Clear ClipSVC, Office vNext, SPP and OSPP licenses +echo - Clear ClipSVC, SPP and OSPP licenses echo - Fix SPP permissions of tokens folder and registries echo - Trigger the repair option for Office. echo: @@ -614,42 +614,28 @@ echo tokens.dat file: [%token%] ) set tokenstore= +set badregistry= for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v TokenStore %nul6%') do call set "tokenstore=%%b" +if %winbuild% GEQ 9200 if /i not "%tokenstore%"=="%SysPath%\spp\store" if /i not "%tokenstore%"=="%SysPath%\spp\store\2.0" if /i not "%tokenstore%"=="%SysPath%\spp\store_test\2.0" ( +set badregistry=1 +echo: +call :dk_color %Red% "Correct path not found in TokenStore Registry [%tokenstore%]" +) :: Check sppsvc permissions and apply fixes -if %winbuild% GEQ 10240 ( - +if %winbuild% GEQ 9200 if not defined badregistry ( echo: echo Checking SPP permission related issues... call :checkperms - if defined permerror ( - -mkdir "%tokenstore%" %nul% -set "d=$sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)';" -set "d=!d! $AclObject = New-Object System.Security.AccessControl.DirectorySecurity;" -set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" -set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" -%psc% "!d!" %nul% - -for %%# in ( -"HKLM:\SYSTEM\WPA_QueryValues, EnumerateSubKeys, WriteKey" -"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform_SetValue" -) do for /f "tokens=1,2 delims=_" %%A in (%%#) do ( -set "d=$acl = Get-Acl '%%A';" -set "d=!d! $rule = New-Object System.Security.AccessControl.RegistryAccessRule ('NT Service\sppsvc', '%%B', 'ContainerInherit, ObjectInherit','None','Allow');" -set "d=!d! $acl.ResetAccessRule($rule);" -set "d=!d! $acl.SetAccessRule($rule);" -set "d=!d! Set-Acl -Path '%%A' -AclObject $acl" -%psc% "!d!" %nul% -) - +call :dk_color %Red% "[!permerror!]" +%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':fixsppperms\:.*';iex ($f[1])" %nul% call :checkperms if defined permerror ( -call :dk_color %Red% "[Failed To Fix]" +call :dk_color %Red% "[!permerror!] [Failed To Fix]" ) else ( -echo [Successfully Fixed] +call :dk_color %Green% "[Successfully Fixed]" ) ) else ( echo [No Error Found] @@ -671,9 +657,9 @@ echo: ) echo: -echo Reinstalling System Licenses [slmgr /rilc]... -cscript //nologo %windir%\system32\slmgr.vbs /rilc %nul% -if %errorlevel% NEQ 0 cscript //nologo %windir%\system32\slmgr.vbs /rilc %nul% +echo Reinstalling System Licenses... +%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% +if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( echo [Successful] ) else ( @@ -1102,21 +1088,167 @@ exit /b :checkperms +:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. + set permerror= -if not exist "%tokenstore%\" set permerror=1 +if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder" for %%# in ( -"%tokenstore%" -"HKLM:\SYSTEM\WPA" -"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -) do if not defined permerror ( -%psc% "$acl = Get-Acl '%%#'; if ($acl.Access.Where{ $_.IdentityReference -eq 'NT SERVICE\sppsvc' -and $_.AccessControlType -eq 'Deny' -or $acl.Access.IdentityReference -notcontains 'NT SERVICE\sppsvc'}) {Exit 2}" %nul% -if !errorlevel!==2 set permerror=1 +"%tokenstore%+FullControl" +"HKLM:\SYSTEM\WPA+QueryValues, EnumerateSubKeys, WriteKey" +"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform+SetValue" +) do for /f "tokens=1,2 delims=+" %%A in (%%#) do if not defined permerror ( +%psc% "$acl = (Get-Acl '%%A' | fl | Out-String); if (-not ($acl -match 'NT SERVICE\\sppsvc Allow %%B') -or ($acl -match 'NT SERVICE\\sppsvc Deny')) {Exit 2}" %nul% +if !errorlevel!==2 ( +if "%%A"=="%tokenstore%" ( +set "permerror=Error Found In Token Folder" +) else ( +set "permerror=Error Found In SPP Registries" +) +) +) + +REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application + +if not defined permerror ( +reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && ( +set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies" +reg query "!pol!" %nul% || reg add "!pol!" %nul% +%psc% "$netServ = (New-Object Security.Principal.SecurityIdentifier('S-1-5-20')).Translate([Security.Principal.NTAccount]).Value; $aclString = Get-Acl 'Registry::!pol!' | Format-List | Out-String; if (-not ($aclString.Contains($netServ + ' Allow FullControl') -or $aclString.Contains('NT SERVICE\sppsvc Allow FullControl')) -or ($aclString.Contains('Deny'))) {Exit 3}" %nul% +if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP" +) ) exit /b ::======================================================================================================================================== +:: Fix SPP related registry and folder permissions + +:fixsppperms: +# Fix perms for Token Folder + +if ($env:permerror -eq 'Error Found In Token Folder') { + New-Item -Path $env:tokenstore -ItemType Directory -Force + $sddl = 'O:BAG:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICIIO;GR;;;BU)(A;;FR;;;BU)(A;OICI;FA;;;S-1-5-80-123231216-2592883651-3715271367-3753151631-4175906628)' + $AclObject = New-Object System.Security.AccessControl.DirectorySecurity + $AclObject.SetSecurityDescriptorSddlForm($sddl) + Set-Acl -Path $env:tokenstore -AclObject $AclObject + exit +} + +# Fix perms for SPP registries + +if ($env:permerror -eq 'Error Found In SPP Registries') { + $acl = Get-Acl 'HKLM:\SYSTEM\WPA' + $rule = New-Object System.Security.AccessControl.RegistryAccessRule ('NT Service\sppsvc', 'QueryValues, EnumerateSubKeys, WriteKey', 'ContainerInherit, ObjectInherit', 'None', 'Allow') + $acl.ResetAccessRule($rule) + $acl.SetAccessRule($rule) + Set-Acl -Path 'HKLM:\SYSTEM\WPA' -AclObject $acl + + $acl = Get-Acl 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform' + $rule = New-Object System.Security.AccessControl.RegistryAccessRule ('NT Service\sppsvc', 'SetValue', 'ContainerInherit, ObjectInherit', 'None', 'Allow') + $acl.ResetAccessRule($rule) + $acl.SetAccessRule($rule) + Set-Acl -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform' -AclObject $acl + exit +} + +# Fix perms for SPP in HKU\S-1-5-20 +# https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application + +if ($env:permerror -ne 'Error Found In S-1-5-20 SPP') { + exit +} +if (-not (Test-Path 'Registry::HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform')) { + exit +} + +# https://stackoverflow.com/a/35843420 + +function Take-Permissions { + param($rootKey, $key, [System.Security.Principal.SecurityIdentifier]$sid = 'S-1-5-32-545', $recurse = $true) + + switch -regex ($rootKey) { + 'HKCU|HKEY_CURRENT_USER' { $rootKey = 'CurrentUser' } + 'HKLM|HKEY_LOCAL_MACHINE' { $rootKey = 'LocalMachine' } + 'HKCR|HKEY_CLASSES_ROOT' { $rootKey = 'ClassesRoot' } + 'HKCC|HKEY_CURRENT_CONFIG' { $rootKey = 'CurrentConfig' } + 'HKU|HKEY_USERS' { $rootKey = 'Users' } + } + + ### Step 1 - escalate current process's privilege + # get SeTakeOwnership, SeBackup and SeRestore privileges before executes next lines, script needs Admin privilege + $AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1) + $ModuleBuilder = $AssemblyBuilder.DefineDynamicModule(2, $False) + $TypeBuilder = $ModuleBuilder.DefineType(0) + $TypeBuilder.DefinePInvokeMethod('RtlAdjustPrivilege', 'ntdll.dll', 'Public, Static', 1, [int], @([int], [bool], [bool], [bool].MakeByRefType()), 1, 3) | Out-Null + 9, 17, 18 | ForEach-Object { $TypeBuilder.CreateType()::RtlAdjustPrivilege($_, $true, $false, [ref]$false) | Out-Null } + + function Take-KeyPermissions { + param($rootKey, $key, $sid, $recurse, $recurseLevel = 0) + + ### Step 2 - get ownerships of key - it works only for current key + $regKey = [Microsoft.Win32.Registry]::$rootKey.OpenSubKey($key, 'ReadWriteSubTree', 'TakeOwnership') + $acl = New-Object System.Security.AccessControl.RegistrySecurity + $acl.SetOwner($sid) + $regKey.SetAccessControl($acl) + + ### Step 3 - enable inheritance of permissions (not ownership) for current key from parent + $acl.SetAccessRuleProtection($false, $false) + $regKey.SetAccessControl($acl) + + ### Step 4 - only for top-level key, change permissions for current key and propagate it for subkeys + # to enable propagations for subkeys, it needs to execute Steps 2-3 for each subkey (Step 5) + if ($recurseLevel -eq 0) { + $regKey = $regKey.OpenSubKey('', 'ReadWriteSubTree', 'ChangePermissions') + $rule = New-Object System.Security.AccessControl.RegistryAccessRule($sid, 'FullControl', 'ContainerInherit', 'None', 'Allow') + $acl.ResetAccessRule($rule) + $regKey.SetAccessControl($acl) + } + + ### Step 5 - recursively repeat steps 2-5 for subkeys + if ($recurse) { + foreach ($subKey in $regKey.OpenSubKey('').GetSubKeyNames()) { + Take-KeyPermissions $rootKey ($key + '\' + $subKey) $sid $recurse ($recurseLevel + 1) + } + } + } + + Take-KeyPermissions $rootKey $key $sid $recurse +} + +Take-Permissions "Users" "S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" "S-1-5-20" +:fixsppperms: + +::======================================================================================================================================== + +:: Install License files using Powershell/WMI instead of slmgr.vbs + +:xrm: +function InstallLicenseFile($Lsc) { + try { + $null = $sls.InstallLicense([IO.File]::ReadAllText($Lsc)) + } catch { + $host.SetShouldExit($_.Exception.HResult) + } +} +function InstallLicenseArr($Str) { + $a = $Str -split ';' + ForEach ($x in $a) {InstallLicenseFile "$x"} +} +function InstallLicenseDir($Loc) { + dir $Loc *.xrm-ms -af -s | select -expand FullName | % {InstallLicenseFile "$_"} +} +function ReinstallLicenses() { + $Oem = "$env:SysPath\oem" + $Spp = "$env:SysPath\spp\tokens" + InstallLicenseDir "$Spp" + If (Test-Path $Oem) {InstallLicenseDir "$Oem"} +} +:xrm: + +::======================================================================================================================================== + :scandat set token= -- cgit v1.2.3 From fb113c7c243190b267722d4a5fca48bc0a7a40e4 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 Aug 2024 04:48:57 +0530 Subject: Replace wmic.exe with Powershell in fix wmi --- MAS/Separate-Files-Version/Troubleshoot.cmd | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 415f204..e35d102 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -892,12 +892,6 @@ echo WMI rebuild is not recommended on Windows Server. Aborting... goto :at_back ) -for %%# in (wmic.exe) do @if "%%~$PATH:#"=="" ( -%eline% -echo wmic.exe file is not found in the system. Aborting... -goto :at_back -) - echo: echo Checking WMI call :checkwmi @@ -1030,12 +1024,12 @@ exit /b :: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants set error= -wmic path Win32_ComputerSystem get CreationClassName /value %nul2% | find /i "computersystem" %nul1% +%psc% "Get-WmiObject -Class Win32_ComputerSystem | Select-Object -Property CreationClassName" %nul2% | find /i "computersystem" %nul1% if %errorlevel% NEQ 0 (set error=1& exit /b) winmgmt /verifyrepository %nul% if %errorlevel% NEQ 0 (set error=1& exit /b) -cscript //nologo %windir%\system32\slmgr.vbs /dlv %nul% +%psc% "try { $null=([WMISEARCHER]'SELECT * FROM SoftwareLicensingService').Get().Version; exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul% cmd /c exit /b %errorlevel% echo "0x%=ExitCode%" | findstr /i "0x800410 0x800440" %nul1% if %errorlevel% EQU 0 set error=1 -- cgit v1.2.3 From d55b9fa78c301672774a1fb4be13d55935871762 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 18 Aug 2024 05:08:35 +0530 Subject: Avoid using pause if Terminal is detected --- MAS/Separate-Files-Version/Check-Activation-Status.cmd | 17 +++++++++++++++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 13 +++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Check-Activation-Status.cmd b/MAS/Separate-Files-Version/Check-Activation-Status.cmd index 02bedad..a9ba6a4 100644 --- a/MAS/Separate-Files-Version/Check-Activation-Status.cmd +++ b/MAS/Separate-Files-Version/Check-Activation-Status.cmd @@ -6,10 +6,23 @@ :: https://gravesoft.dev/cas +:: Set Environment variables, it helps if they are misconfigured in the system + +setlocal EnableExtensions +setlocal DisableDelayedExpansion + +set "PathExt=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" + +set "SysPath=%SystemRoot%\System32" set "Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\" if exist "%SystemRoot%\Sysnative\reg.exe" ( +set "SysPath=%SystemRoot%\Sysnative" set "Path=%SystemRoot%\Sysnative;%SystemRoot%;%SystemRoot%\Sysnative\Wbem;%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\;%Path%" ) + +set "ComSpec=%SysPath%\cmd.exe" +set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;%SysPath%\WindowsPowerShell\v1.0\Modules" + set "_psc=powershell -nop -c" set "_err===== ERROR ====" set _pwsh=1 @@ -29,8 +42,8 @@ setlocal EnableDelayedExpansion :E_Exit echo. -echo Press any key to exit. -pause >nul +echo Press 0 key to exit. +choice /c 0 /n exit /b :sppmgr: diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index e35d102..eeaa116 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -829,10 +829,14 @@ echo: ) else ( echo: call :dk_color %_Yellow% "A Window will popup, in that Window you need to select [Quick] Repair Option..." +if defined terminal ( +call :dk_color %_Yellow% "Press 0 key to continue..." +choice /c 0 /n +) else ( call :dk_color %_Yellow% "Press any key to continue..." -echo: pause %nul1% ) +) if defined uwp16 ( echo: @@ -1042,8 +1046,13 @@ exit /b echo: echo %line% echo: -call :dk_color %_Yellow% "Press any key to go back..." +if defined terminal ( +call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +choice /c 0 /n +) else ( +call :dk_color %_Yellow% "Press any key to %_exitmsg%..." pause %nul1% +) goto :at_menu ::======================================================================================================================================== -- cgit v1.2.3 From b983bd41dabe0d683c851e7e4d3d9f6c1a13904d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 19 Aug 2024 05:29:19 +0530 Subject: Replace square brackets with double quotes in string comparison --- .../Activators/HWID_Activation.cmd | 4 +-- .../Activators/KMS38_Activation.cmd | 4 +-- .../Activators/Ohook_Activation_AIO.cmd | 42 +++++++++++----------- .../Activators/Online_KMS_Activation.cmd | 36 +++++++++---------- MAS/Separate-Files-Version/Change_Edition.cmd | 4 +-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 +-- 7 files changed, 48 insertions(+), 48 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index e7ff464..25c6754 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -290,7 +290,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -395,7 +395,7 @@ call :dk_showosinfo set _int= for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int ( -for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not [%%#]==[] set _int=1) +for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1) ) if not defined _int ( diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 9e25df5..93ca46d 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -293,7 +293,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -1190,7 +1190,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b for %%# in (Volume:GVLK) do ( call :k_pkey %osSKU% '%%#' if defined pkey call :k_pkeychannel !pkey! -if /i [!pkeychannel!]==[%%#] ( +if /i "!pkeychannel!"=="%%#" ( set key=!pkey! exit /b ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index f7046a7..4dcc8f1 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -283,7 +283,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -520,11 +520,11 @@ echo "!_oIds!" | find /i " %%a " %nul1% || (set "_oIds= !_oIds! %%a ") set "_oLPath=%_oRoot%\Licenses" set "_oIntegrator=%_oRoot%\integration\integrator.exe" -if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll") -if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll") -if not [%osarch%]==[x86] ( -if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll" -if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" +if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll") +if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll") +if not "%osarch%"=="x86" ( +if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll" +if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" ) else ( set "_sppcPath=%SystemRoot%\System32\sppc.dll" ) @@ -570,11 +570,11 @@ set _o16c2rIds=%_oIds% set "_oLPath=%_oRoot%\Licenses16" set "_oIntegrator=%_oRoot%\integration\integrator.exe" -if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll") -if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll") -if not [%osarch%]==[x86] ( -if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll" -if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" +if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%\vfs\System" & set "_hook=sppc64.dll") +if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%\vfs\SystemX86" & set "_hook=sppc32.dll") +if not "%osarch%"=="x86" ( +if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll" +if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" ) else ( set "_sppcPath=%SystemRoot%\System32\sppc.dll" ) @@ -613,7 +613,7 @@ call :dk_color %Gray% "Checking Old Office With Sub License [Found. Update Of set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" echo "%_oIds%" | find /i "Volume" %nul1% && ( if %winbuild% GEQ 9200 ( -if not [%osarch%]==[x86] ( +if not "%osarch%"=="x86" ( reg delete "%kmskey%" /f /reg:32 %nul% reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg:32 %nul% ) @@ -976,7 +976,7 @@ set _prod=%%#!_preview! call :ohookdata getinfo !_prod! -if not [!key!]==[] ( +if not "!key!"=="" ( echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic call :dk_inskey "[!key!] [!_prod!] [!_lic!]" ) else ( @@ -1017,14 +1017,14 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %2\Common\ProductVersion /v LastPr if "%_oRoot:~-1%"=="\" set "_oRoot=%_oRoot:~0,-1%" echo "%2" | find /i "Wow6432Node" %nul1% && set _oArch=x86 -if not [%osarch%]==[x86] if not defined _oArch set _oArch=x64 -if [%osarch%]==[x86] set _oArch=x86 - -if [%_oArch%]==[x64] (set "_hookPath=%_oRoot%" & set "_hook=sppc64.dll") -if [%_oArch%]==[x86] (set "_hookPath=%_oRoot%" & set "_hook=sppc32.dll") -if not [%osarch%]==[x86] ( -if [%_oArch%]==[x64] set "_sppcPath=%SystemRoot%\System32\sppc.dll" -if [%_oArch%]==[x86] set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" +if not "%osarch%"=="x86" if not defined _oArch set _oArch=x64 +if "%osarch%"=="x86" set _oArch=x86 + +if "%_oArch%"=="x64" (set "_hookPath=%_oRoot%" & set "_hook=sppc64.dll") +if "%_oArch%"=="x86" (set "_hookPath=%_oRoot%" & set "_hook=sppc32.dll") +if not "%osarch%"=="x86" ( +if "%_oArch%"=="x64" set "_sppcPath=%SystemRoot%\System32\sppc.dll" +if "%_oArch%"=="x86" set "_sppcPath=%SystemRoot%\SysWOW64\sppc.dll" ) else ( set "_sppcPath=%SystemRoot%\System32\sppc.dll" ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 92efa98..8b75815 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -312,7 +312,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -452,7 +452,7 @@ call :dk_showosinfo set _int= for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int ( -for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not [%%#]==[] set _int=1) +for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1) ) if not defined _int ( @@ -1079,7 +1079,7 @@ set _prod=!_altoffid! call :ks_osppready ) -if not [!key!]==[] ( +if not "!key!"=="" ( echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic call :dk_inskey "[!key!] [!_prod!]" ) else ( @@ -1119,8 +1119,8 @@ for /f "skip=2 tokens=2*" %%a in ('"reg query %2\Common\ProductVersion /v LastPr if "%_oRoot:~-1%"=="\" set "_oRoot=%_oRoot:~0,-1%" echo "%2" | find /i "Wow6432Node" %nul1% && set _oArch=x86 -if not [%osarch%]==[x86] if not defined _oArch set _oArch=x64 -if [%osarch%]==[x86] set _oArch=x86 +if not "%osarch%"=="x86" if not defined _oArch set _oArch=x64 +if "%osarch%"=="x86" set _oArch=x86 set "_common=%CommonProgramFiles%" if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%" @@ -1565,12 +1565,12 @@ call :_tasksetserv for %%a in (%srvlist%) do ( for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do ( -if not [%%#]==[] goto _taskIntConnected +if not "%%#"=="" goto _taskIntConnected ) ) nslookup dns.msftncsi.com 2>nul | find "131.107.255.255" 1>nul -if [%errorlevel%]==[0] goto _taskIntConnected +if "%errorlevel%"=="0" goto _taskIntConnected if %loop%==%max_loop% ( set _tserror=1 @@ -1681,14 +1681,14 @@ set /a act_attempt=0 if %act_attempt% GTR 4 exit /b -if not [%act_ok%]==[1] ( +if not "%act_ok%"=="1" ( if not defined _server call :_taskgetserv call :_taskregserv ) if not !server_num! GTR %max_servers% ( -if [%1]==[act_win] if %_kms38% EQU 1 ( +if "%1"=="act_win" if %_kms38% EQU 1 ( set act_ok=1 exit /b ) @@ -1702,7 +1702,7 @@ if !errorcode! EQU 0 ( set act_ok=1 exit /b ) -if [%1]==[act_win] if !errorcode! EQU -1073418187 if %winbuild% LSS 9200 ( +if "%1"=="act_win" if !errorcode! EQU -1073418187 if %winbuild% LSS 9200 ( set act_ok=1 exit /b ) @@ -1717,9 +1717,9 @@ exit /b :_actinfo -if [%1]==[act_win] if not defined t_name (set prodname=%winos%) +if "%1"=="act_win" if not defined t_name (set prodname=%winos%) -if [%1]==[act_win] if %_kms38% EQU 1 ( +if "%1"=="act_win" if %_kms38% EQU 1 ( if defined t_name ( echo %prodname% is already activated with KMS38. ) else ( @@ -1739,7 +1739,7 @@ set _tserror=1 exit /b ) -if %errorcode% EQU -1073418187 if [%1]==[act_win] if %winbuild% LSS 9200 ( +if %errorcode% EQU -1073418187 if "%1"=="act_win" if %winbuild% LSS 9200 ( if defined t_name ( echo %prodname% cannot be KMS-activated on this computer due to unqualified OEM BIOS [0xC004F035]. ) else ( @@ -1784,9 +1784,9 @@ exit /b ) set _actpass=1 -if %gpr% EQU 43200 if [%1]==[act_win] if %winbuild% GEQ 9200 set _actpass=0 +if %gpr% EQU 43200 if "%1"=="act_win" if %winbuild% GEQ 9200 set _actpass=0 if %gpr% EQU 64800 set _actpass=0 -if %gpr% GTR 259200 if [%1]==[act_win] call :_taskchkEnterpriseG _actpass +if %gpr% GTR 259200 if "%1"=="act_win" call :_taskchkEnterpriseG _actpass if %gpr% EQU 259200 set _actpass=0 if %errorcode% EQU 0 if %_actpass% EQU 0 ( @@ -1990,8 +1990,8 @@ set !server%rand%!=1 set /a server_num+=1 (for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%a" -if [%KMS_IP%]==[!KMS_IP!] for /f "delims=[] tokens=2" %%# in ('pathping -4 -h 1 -n -p 1 -q 1 -w 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%#" -if not [%KMS_IP%]==[!KMS_IP!] exit /b +if "%KMS_IP%"=="!KMS_IP!" for /f "delims=[] tokens=2" %%# in ('pathping -4 -h 1 -n -p 1 -q 1 -w 1 %KMS_IP% 2^>nul') do set "KMS_IP=%%#" +if not "%KMS_IP%"=="!KMS_IP!" exit /b goto :_taskgetserv ) ::Ver:2.7 @@ -2546,7 +2546,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b for %%# in (Volume:GVLK) do ( call :k_pkey %osSKU% '%%#' if defined pkey call :k_pkeychannel !pkey! -if /i [!pkeychannel!]==[%%#] ( +if /i "!pkeychannel!"=="%%#" ( set key=!pkey! exit /b ) diff --git a/MAS/Separate-Files-Version/Change_Edition.cmd b/MAS/Separate-Files-Version/Change_Edition.cmd index 3657de0..0ccfe42 100644 --- a/MAS/Separate-Files-Version/Change_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Edition.cmd @@ -248,7 +248,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -935,7 +935,7 @@ for %%# in (pkeyhelper.dll) do @if "%%~$PATH:#"=="" exit /b for %%# in (%keyflow%) do ( call :k_pkey %targetSKU% '%%#' if defined pkey call :k_pkeychannel !pkey! -if /i [!pkeychannel!]==[%%#] ( +if /i "!pkeychannel!"=="%%#" ( set key=!pkey! exit /b ) diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 55db54b..431dc43 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -242,7 +242,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index eeaa116..eea9c95 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -243,7 +243,7 @@ set -= set old= for /f "delims=[] tokens=2" %%# in ('ping -4 -n 1 updatecheck.mass%-%grave.dev') do ( -if not [%%#]==[] (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) +if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.69.%masver%" %nul1% || set old=1)) ) if defined old ( @@ -340,7 +340,7 @@ goto :at_back set _int= for %%a in (l.root-servers.net resolver1.opendns.com download.windowsupdate.com google.com) do if not defined _int ( -for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not [%%#]==[] set _int=1) +for /f "delims=[] tokens=2" %%# in ('ping -n 1 %%a') do (if not "%%#"=="" set _int=1) ) echo: -- cgit v1.2.3 From ae48118ddb1742765709bbe3cf447766114db064 Mon Sep 17 00:00:00 2001 From: Adel Aloui Date: Mon, 19 Aug 2024 01:22:08 +0100 Subject: Rephrase text and fix issue #521 --- MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd | 16 ++++++++-------- .../Activators/HWID_Activation.cmd | 2 +- .../Activators/KMS38_Activation.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Change_Edition.cmd | 4 ++-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd b/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd index b5b0c7a..ee88f49 100644 --- a/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd +++ b/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd @@ -221,7 +221,7 @@ if not defined _MASunattended ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -285,7 +285,7 @@ echo: [8] Help echo: [0] Exit echo: ______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,0] :" +call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,8,0] :" choice /C:123456780 /N set _erl=%errorlevel% @@ -326,7 +326,7 @@ echo: echo: [0] Go to Main Menu echo: ______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,0] :" +call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,0] :" choice /C:12340 /N set _erl=%errorlevel% @@ -392,7 +392,7 @@ call :_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Go Back echo: ________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard:" +call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard:" choice /C:123456789R0 /N set _erl=%errorlevel% @@ -1786,7 +1786,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b @@ -3111,7 +3111,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,0]" choice /C:120 /N set _el=!errorlevel! if !_el!==3 exit /b @@ -4047,7 +4047,7 @@ echo. echo. [0] %_exitmsg% echo. ______________________________________________________________ echo. -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,0]" +call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,0]" choice /C:12345670 /N set _el=%errorlevel% @@ -8799,7 +8799,7 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" choice /C:1234560 /N set _erl=%errorlevel% diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 25c6754..cf32083 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -303,7 +303,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 93ca46d..9a0b303 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -306,7 +306,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -339,7 +339,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,0]" choice /C:120 /N set _el=!errorlevel! if !_el!==3 exit /b diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 4dcc8f1..a45c9bd 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -296,7 +296,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -332,7 +332,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 8b75815..d6b27d8 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -325,7 +325,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -385,7 +385,7 @@ echo [9] Download Office echo [0] %_exitmsg% echo ______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,9,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,8,9,0]" choice /C:1234567890 /N set _el=!errorlevel! diff --git a/MAS/Separate-Files-Version/Change_Edition.cmd b/MAS/Separate-Files-Version/Change_Edition.cmd index 0ccfe42..23bd0e2 100644 --- a/MAS/Separate-Files-Version/Change_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Edition.cmd @@ -261,7 +261,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -488,7 +488,7 @@ echo: echo [1] Continue echo [0] Go Back echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 goto cedmenu2 if !errorlevel!==1 rem diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 431dc43..0811c33 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -255,7 +255,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -349,7 +349,7 @@ call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Exit echo: ________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" choice /C:123456789R0 /N set _erl=%errorlevel% diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index eea9c95..40e3c3a 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -256,7 +256,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -310,7 +310,7 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" choice /C:1234560 /N set _erl=%errorlevel% -- cgit v1.2.3 From bf814304c62cbeba6e18ddf83b023363f3857dce Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 19 Aug 2024 18:40:07 +0530 Subject: Add fix for issues caused by update KB971033 in Windows 7 --- MAS/Separate-Files-Version/Troubleshoot.cmd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 40e3c3a..74ceb0e 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -646,6 +646,23 @@ echo: echo Stopping sppsvc service... %psc% Stop-Service sppsvc -force %nul% +if %winbuild% LSS 9200 ( +REM Fix issues caused by Update KB971033 in Windows 7 +REM https://support.microsoft.com/help/4487266 +echo: +echo Checking Update KB971033... +%psc% "if (Get-Hotfix -Id KB971033 -ErrorAction SilentlyContinue) {Exit 3}" %nul% +if !errorlevel!==3 ( +echo Found, uninstalling it... +wusa /uninstall /quiet /norestart /kb:971033 +) else ( +echo [Not Found] +) +%psc% Stop-Service sppuinotify -force %nul% +sc config sppuinotify start= disabled +del /f /q %SysPath%\7B296FB0-376B-497e-B012-9C450E1B7327-*.C7483456-A289-439d-8115-601632D005A0 /ah +) + echo: call :scandat delete call :scandat check @@ -675,6 +692,10 @@ call :dk_color %Red% "Failed to rebuilt tokens.dat file." echo tokens.dat file was rebuilt successfully. ) +if %winbuild% LSS 9200 ( +sc config sppuinotify start= demand +) + ::======================================================================================================================================== :: Rebuild OSPP Tokens @@ -1373,6 +1394,7 @@ if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '% ) exit /b + ::======================================================================================================================================== :: Set variables -- cgit v1.2.3 From 3fd16669264dc9c85c37957d949bb6f37021d9a1 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 19 Aug 2024 18:43:14 +0530 Subject: Fix color code --- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 0811c33..c3e4a85 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -777,7 +777,7 @@ exit /b if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[0m ) else ( -if not exist %psc% (echo %~3) else (%psc% write-host -back '%1' -fore '%2' '%3') +%psc% write-host -back '%1' -fore '%2' '%3' ) exit /b @@ -786,7 +786,7 @@ exit /b if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m ) else ( -if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6') +%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6' ) exit /b diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 74ceb0e..3196a43 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1381,7 +1381,7 @@ exit /b if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[0m ) else ( -if not exist %psc% (echo %~3) else (%psc% write-host -back '%1' -fore '%2' '%3') +%psc% write-host -back '%1' -fore '%2' '%3' ) exit /b @@ -1390,11 +1390,10 @@ exit /b if %_NCS% EQU 1 ( echo %esc%[%~1%~2%esc%[%~3%~4%esc%[0m ) else ( -if not exist %psc% (echo %~3%~6) else (%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6') +%psc% write-host -back '%1' -fore '%2' '%3' -NoNewline; write-host -back '%4' -fore '%5' '%6' ) exit /b - ::======================================================================================================================================== :: Set variables -- cgit v1.2.3 From 0d26ba046efae62c0002303313cc899ccdfa8f15 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 19 Aug 2024 19:07:39 +0530 Subject: Use %syspath% --- MAS/Separate-Files-Version/Troubleshoot.cmd | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 3196a43..fb8522b 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -844,7 +844,7 @@ echo: if %counter% EQU 0 ( echo: -echo Installed Office is not found. +echo Office ^(2010 and later^) is not installed. goto :repairend echo: ) else ( @@ -983,8 +983,8 @@ exit echo: echo Deleting WMI repository -rmdir /s /q "%windir%\System32\wbem\repository\" %nul% -if exist "%windir%\System32\wbem\repository\" ( +rmdir /s /q "%SysPath%\wbem\repository\" %nul% +if exist "%SysPath%\wbem\repository\" ( call :dk_color %Red% "[Failed]" ) else ( echo [Successful] @@ -1029,9 +1029,9 @@ goto :at_back :: https://eskonr.com/2012/01/how-to-fix-wmi-issues-automatically/ %psc% Stop-Service Winmgmt -force %nul% -cd /d %systemroot%\system32\wbem\ -regsvr32 /s %systemroot%\system32\scecli.dll -regsvr32 /s %systemroot%\system32\userenv.dll +cd /d %SysPath%\wbem\ +regsvr32 /s %SysPath%\scecli.dll +regsvr32 /s %SysPath%\userenv.dll mofcomp cimwin32.mof mofcomp cimwin32.mfl mofcomp rsop.mof @@ -1277,9 +1277,9 @@ function ReinstallLicenses() { set token= for %%# in ( -%Systemdrive%\Windows\System32\spp\store_test\2.0\ -%Systemdrive%\Windows\System32\spp\store\ -%Systemdrive%\Windows\System32\spp\store\2.0\ +%SysPath%\spp\store_test\2.0\ +%SysPath%\spp\store\ +%SysPath%\spp\store\2.0\ %Systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\ ) do ( -- cgit v1.2.3 From 1f50e4ba98acf455967eadc11e6fc5719145e702 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 19 Aug 2024 19:53:05 +0530 Subject: Allow Office repair on ARM64 as well --- MAS/Separate-Files-Version/Troubleshoot.cmd | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index fb8522b..fbd71b6 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -765,15 +765,6 @@ echo: for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE') do set arch=%%b -if /i "%arch%"=="ARM64" ( -echo: -echo ARM64 Windows Found. -echo You need to use repair option in Windows settings for Office. -echo: -start ms-settings:appsfeatures -goto :repairend -) - if /i "%arch%"=="x86" ( set arch=X86 ) else ( @@ -790,12 +781,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\EntityPicker.dll" (set "msi14_86=Office 14.0 MSI x86" & set "msi14repair86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe") -for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi14_68=Office 14.0 MSI x86/x64" & set "msi14repair68=%systemdrive%\Program Files\Common Files\microsoft shared\OFFICE14\Office Setup Controller\Setup.exe") -for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi15_86=Office 15.0 MSI x86" & set "msi15repair86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE15\Office Setup Controller\Setup.exe") -for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\15.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi15_68=Office 15.0 MSI x86/x64" & set "msi15repair68=%systemdrive%\Program Files\Common Files\microsoft shared\OFFICE15\Office Setup Controller\Setup.exe") -for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi16_86=Office 16.0 MSI x86" & set "msi16repair86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\Office Setup Controller\Setup.exe") -for /f "skip=2 tokens=2*" %%a in ('"reg query %_68%\16.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.dll" (set "msi16_68=Office 16.0 MSI x86/x64" & set "msi16repair68=%systemdrive%\Program Files\Common Files\Microsoft Shared\OFFICE16\Office Setup Controller\Setup.exe") +for /f "skip=2 tokens=2*" %%a in ('"reg query %_86%\14.0\Common\InstallRoot /v Path" %nul6%') do if exist "%%b\EntityPicker.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\EntityPicker.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\EntityPicker.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\EntityPicker.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\EntityPicker.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\EntityPicker.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" & set "c2r15repair86=%systemdrive%\Program Files\Microsoft Office 15\Client%arch%\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" & set "c2r15repair68=%systemdrive%\Program Files\Microsoft Office 15\Client%arch%\integratedoffice.exe") @@ -901,6 +892,15 @@ echo: call :dk_color %Green% "Finished" goto :at_back +:getrepairsetup + +set "_common86=%systemdrive%\Program Files (x86)\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe" +set "_common68=%systemdrive%\Program Files\Common Files\Microsoft Shared\OFFICE%2\Office Setup Controller\setup.exe" + +if exist "%_common86%" set "%1=%_common86%" +if exist "%_common68%" set "%1=%_common68%" +exit /b + ::======================================================================================================================================== :fixwmi -- cgit v1.2.3 From ed3dace78fffc4ac3c28a04e1190a0d2b9b24099 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 20 Aug 2024 03:13:20 +0530 Subject: Cleanup some registry keys --- MAS/Separate-Files-Version/Troubleshoot.cmd | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index fbd71b6..a452af2 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -663,6 +663,16 @@ sc config sppuinotify start= disabled del /f /q %SysPath%\7B296FB0-376B-497e-B012-9C450E1B7327-*.C7483456-A289-439d-8115-601632D005A0 /ah ) +:: Delete registry keys that are not deleted by activation scripts + +%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "ServiceSessionId" /f +%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "LicStatusArray" /f +%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "PolicyValuesArray" /f +%nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f +%nul% reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies" /f +%nul% reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies" /f +%nul% reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\data" /f + echo: call :scandat delete call :scandat check -- cgit v1.2.3 From 9e5062e7cc3798e0e3da5a60d684ae37d12c47ff Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 20 Aug 2024 03:51:13 +0530 Subject: Update deletion of Office related keys --- MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 2 ++ MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 2 ++ MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 2e22d3a..0d9e9fc 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1187,6 +1187,8 @@ reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f /reg:32 %nul% ) reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% +reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% +reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul% echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts] diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 8ec8ac0..ad683c0 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1288,6 +1288,8 @@ reg delete "HKLM\SOFTWARE\Microsoft\Office\%%#.0\Common\OEM" /f /reg:32 %nul% ) reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% +reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% +reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul% echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts] diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index a452af2..04a3273 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -665,12 +665,12 @@ del /f /q %SysPath%\7B296FB0-376B-497e-B012-9C450E1B7327-*.C7483456-A289-439d-81 :: Delete registry keys that are not deleted by activation scripts +echo: +echo Cleaning some licensing-related registry keys... %nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "ServiceSessionId" /f %nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "LicStatusArray" /f %nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "PolicyValuesArray" /f %nul% reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f -%nul% reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies" /f -%nul% reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies" /f %nul% reg delete "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform\data" /f echo: -- cgit v1.2.3 From d372b622807e45236d1ab0e71168f15e3045d399 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Tue, 20 Aug 2024 04:54:16 +0530 Subject: Revert "Merge pull request #542 from alouiadel/dev" This reverts commit 1dfd3f662639ad6f16865be553eed8bf55e5eb30, reversing changes made to 79bc7b024214490aca891a12202475a22b3de482. --- MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd | 16 ++++++++-------- .../Activators/HWID_Activation.cmd | 2 +- .../Activators/KMS38_Activation.cmd | 4 ++-- .../Activators/Ohook_Activation_AIO.cmd | 4 ++-- .../Activators/Online_KMS_Activation.cmd | 4 ++-- MAS/Separate-Files-Version/Change_Edition.cmd | 4 ++-- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 4 ++-- MAS/Separate-Files-Version/Troubleshoot.cmd | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd b/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd index ee88f49..b5b0c7a 100644 --- a/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd +++ b/MAS/All-In-One-Version/MAS_AIO-CRC32_31F7FD1E.cmd @@ -221,7 +221,7 @@ if not defined _MASunattended ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -285,7 +285,7 @@ echo: [8] Help echo: [0] Exit echo: ______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,8,0] :" +call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,0] :" choice /C:123456780 /N set _erl=%errorlevel% @@ -326,7 +326,7 @@ echo: echo: [0] Go to Main Menu echo: ______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,0] :" +call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,0] :" choice /C:12340 /N set _erl=%errorlevel% @@ -392,7 +392,7 @@ call :_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Go Back echo: ________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard:" +call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard:" choice /C:123456789R0 /N set _erl=%errorlevel% @@ -1786,7 +1786,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b @@ -3111,7 +3111,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]" choice /C:120 /N set _el=!errorlevel! if !_el!==3 exit /b @@ -4047,7 +4047,7 @@ echo. echo. [0] %_exitmsg% echo. ______________________________________________________________ echo. -call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,0]" +call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,0]" choice /C:12345670 /N set _el=%errorlevel% @@ -8799,7 +8799,7 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" +call :_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" choice /C:1234560 /N set _erl=%errorlevel% diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 996f407..4731a7a 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -303,7 +303,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 0abad14..b716d16 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -306,7 +306,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -339,7 +339,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]" choice /C:120 /N set _el=!errorlevel! if !_el!==3 exit /b diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 0d9e9fc..f9b4e4b 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -296,7 +296,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -332,7 +332,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index ad683c0..ae3bc02 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -325,7 +325,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -385,7 +385,7 @@ echo [9] Download Office echo [0] %_exitmsg% echo ______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard [1,2,3,4,5,6,7,8,9,0]" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,9,0]" choice /C:1234567890 /N set _el=!errorlevel! diff --git a/MAS/Separate-Files-Version/Change_Edition.cmd b/MAS/Separate-Files-Version/Change_Edition.cmd index 4199b71..07855b1 100644 --- a/MAS/Separate-Files-Version/Change_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Edition.cmd @@ -261,7 +261,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -488,7 +488,7 @@ echo: echo [1] Continue echo [0] Go Back echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 goto cedmenu2 if !errorlevel!==1 rem diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index c3e4a85..d09a792 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -255,7 +255,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -349,7 +349,7 @@ call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Exit echo: ________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" choice /C:123456789R0 /N set _erl=%errorlevel% diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 04a3273..873032f 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -256,7 +256,7 @@ if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option on your keyboard [1,0] :" +call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -310,7 +310,7 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option on your keyboard :" +call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" choice /C:1234560 /N set _erl=%errorlevel% -- cgit v1.2.3 From 19be25c02969cee1d8e896d012a42f586264f1e9 Mon Sep 17 00:00:00 2001 From: Lyssa Date: Tue, 20 Aug 2024 12:15:06 -0500 Subject: Fix many grammar/spelling issues in the script (#543) * Proof-read Change Edition script * . * Proof-read OEM folder script * Update Change_Edition.cmd * Update Troubleshoot.cmd * Update Troubleshoot.cmd * Update HWID_Activation.cmd * Update HWID_Activation.cmd * Update HWID_Activation.cmd * Update KMS38_Activation.cmd * Add files via upload * Update Change_Edition.cmd * I'm tired * Update Extract_OEM_Folder.cmd * Update Troubleshoot.cmd * Update HWID_Activation.cmd * Update HWID_Activation.cmd * Update HWID_Activation.cmd * finish with hwid * Update KMS38_Activation.cmd * final kms38 update * Update Ohook_Activation_AIO.cmd * start ohook * Update Ohook_Activation_AIO.cmd * Update Online_KMS_Activation.cmd * Update HWID_Activation.cmd * Update KMS38_Activation.cmd * Update Ohook_Activation_AIO.cmd * Update Online_KMS_Activation.cmd * Update Change_Edition.cmd * Update Extract_OEM_Folder.cmd * Update Troubleshoot.cmd --------- Co-authored-by: nekoppai <109633131+nekoppai@users.noreply.github.com> Co-authored-by: WindowsAddict --- .../Activators/HWID_Activation.cmd | 89 +++++++-------- .../Activators/KMS38_Activation.cmd | 101 ++++++++--------- .../Activators/Ohook_Activation_AIO.cmd | 105 +++++++++--------- .../Activators/Online_KMS_Activation.cmd | 75 ++++++------- MAS/Separate-Files-Version/Change_Edition.cmd | 82 +++++++------- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 30 +++--- MAS/Separate-Files-Version/Troubleshoot.cmd | 119 +++++++++++---------- 7 files changed, 303 insertions(+), 298 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 4731a7a..04d0023 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -27,7 +27,7 @@ set "_debug=0" ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -160,22 +160,22 @@ call :dk_setvar if %winbuild% LSS 10240 ( %eline% echo Unsupported OS version detected [%winbuild%]. -echo HWID Activation is supported only for Windows 10/11. +echo HWID Activation is only supported on Windows 10/11. echo: -call :dk_color %Blue% "Use Online KMS Activation option." +call :dk_color %Blue% "Use Online KMS activation option." goto dk_done ) if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( %eline% -echo HWID Activation is not supported for Windows Server. -call :dk_color %Blue% "Use KMS38 or Online KMS Activation option." +echo HWID Activation is not supported on Windows Server. +call :dk_color %Blue% "Use KMS38 or Online KMS activation option." goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -195,8 +195,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -237,7 +237,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -296,14 +296,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -329,7 +329,7 @@ ClipUp.exe ) do ( if not exist %SysPath%\%%# ( %eline% -echo [%SysPath%\%%#] file is missing. Aborting... +echo [%SysPath%\%%#] file is missing, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -356,12 +356,12 @@ if defined _perm ( cls echo ___________________________________________________________________________________________ echo: -call :dk_color2 %_White% " " %Green% "Checking: %winos% is Permanently Activated." +call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated." call :dk_color2 %_White% " " %Gray% "Activation is not required." echo ___________________________________________________________________________________________ if %_unattended%==1 goto dk_done echo: -choice /C:10 /N /M "> [1] Activate [0] %_exitmsg% : " +choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : " if errorlevel 2 exit /b ) cls @@ -375,7 +375,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2 %eline% echo [%winos% ^| %winbuild%] echo: -echo Evaluation Editions cannot be activated outside of evaluation period. +echo Evaluation editions cannot be activated outside of their evaluation period. echo: set fixes=%fixes% %mas%evaluation_editions call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions" @@ -408,7 +408,7 @@ echo Checking Internet Connection [Connected%ping_f%] ) else ( set error=1 call :dk_color %Red% "Checking Internet Connection [Not Connected]" -call :dk_color %Blue% "Internet is required for HWID Activation." +call :dk_color %Blue% "Internet is required for HWID activation." ) ::======================================================================================================================================== @@ -457,13 +457,13 @@ if not defined key ( %eline% echo [%winos% ^| %winbuild% ^| SKU:%osSKU%] if not defined skunotfound ( -echo This product does not support HWID Activation. -echo Try KMS38 Activation option. -echo Make sure you are using updated version of the script. +echo This product does not support HWID activation. +echo Make sure you are using the latest version of the script. +echo If you are, then try KMS38 activation option. set fixes=%fixes% %mas% echo %mas% ) else ( -echo Required License files not found in %SysPath%\spp\tokens\skus\ +echo Required license files not found in %SysPath%\spp\tokens\skus\ set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -479,12 +479,12 @@ if defined notworking set error=1 echo: if defined changekey ( -call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable HWID activation." +call :dk_color %Blue% "[%altedition%] edition product key will be used to enable HWID activation." echo: ) if defined winsub ( -call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]." +call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] detected. Script will activate base edition [SKU ID-%regSKU%]." echo: ) @@ -526,7 +526,7 @@ call :hwiddata ticket copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% if not exist "%tdir%\GenuineTicket.xml" ( -call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting the process]" +call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]" echo [%encoded%] if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% goto :dl_final @@ -544,7 +544,7 @@ set "_xmlexist=if exist "%tdir%\GenuineTicket.xml"" %_xmlexist% ( set error=1 if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -call :dk_color %Red% "Installing GenuineTicket.xml [Failed With ClipSVC Service Restart, Wait...]" +call :dk_color %Red% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]" ) ) @@ -604,7 +604,7 @@ reg delete "%_ident%" /f %nul% reg query "%_ident%" %nul% && ( echo: set error=1 -call :dk_color %Red% "Deleting an IdentityCRL Registry [Failed] [%_ident%]" +call :dk_color %Red% "Deleting IdentityCRL Registry [Failed] [%_ident%]" ) for %%# in (wlidsvc LicenseManager sppsvc) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null") call :dk_refresh @@ -639,7 +639,7 @@ if not defined resfail ( if defined resfail ( set error=1 echo: -call :dk_color %Red% "Checking Licensing Servers [Failed To Connect]" +call :dk_color %Red% "Checking Licensing Servers [Failed to Connect]" set fixes=%fixes% %mas%licensing-servers-issue call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%licensing-servers-issue" ) @@ -702,8 +702,8 @@ call :dk_color %Green% "%winos% is permanently activated with a digital license. ) else ( call :dk_color %Red% "Activation Failed %error_code%" if defined notworking ( -call :dk_color %Blue% "At the time of writing this, HWID Activation was not supported for this product." -call :dk_color %Blue% "Use KMS38 Activation option." +call :dk_color %Blue% "At the time of writing, HWID Activation is not supported for this product." +call :dk_color %Blue% "Use KMS38 activation option instead." ) else ( if not defined error call :dk_color %Blue% "%_fixmsg%" set fixes=%fixes% %mas%troubleshoot @@ -1072,7 +1072,7 @@ set pupfound=%pupfound1%%pupfound2% set hcount=0 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=[AV URLs are blocked in hosts]" +if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]" set wucount=0 for %%# in (wuauserv) do ( @@ -1081,7 +1081,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1) ) ) -if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]" +if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]" sc start sppsvc %nul% echo "%errorlevel%" | findstr "577 225" %nul% && ( @@ -1092,7 +1092,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=% if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" -if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%" +if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." +if defined results call :dk_color %Red% "%results%" set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware" echo: @@ -1111,7 +1112,7 @@ call :dk_chkmal sc query Null %nul% || ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) @@ -1202,7 +1203,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart the system to fix this error." +call :dk_color %Blue% "Restart your system to fix this error." set showfix=1 ) ) @@ -1242,7 +1243,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]" +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" ) || ( echo Checking WPA Registry Count [%wpainfo%] ) @@ -1281,7 +1282,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( set error=1 -call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]" +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" ) ) ) @@ -1352,7 +1353,7 @@ echo Checking Eval WLMS Service [Found] reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( set error=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]" +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -1377,7 +1378,7 @@ set error=1 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) @@ -1407,9 +1408,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% if exist "%tokenstore%\" ( -call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]" +call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( -call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]" +call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" set error=1 set showfix=1 ) @@ -1527,7 +1528,7 @@ if ($osVersion.Build -ge $minBuildNumber) { } for ($i=1; $i -le $count; $i++) { if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Output "Total Keys $count. Error Found- $i key does not exist" + Write-Output "Total Keys $count. Error Found - $i key does not exist." $wpaKey.Close() exit } @@ -1538,7 +1539,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { if ($PSVersionTable.PSVersion.Major -lt 3) { cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1" if ($LASTEXITCODE -ne 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -1546,7 +1547,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { $subkey = $wpaKey.OpenSubKey($_) $p = $subkey.GetValueNames() if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -1585,13 +1586,13 @@ echo: if %_unattended%==1 timeout /t 2 & exit /b if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index b716d16..20f3766 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -30,7 +30,7 @@ set "_debug=0" ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -166,19 +166,19 @@ set "specific_kms=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectio if %winbuild% LSS 14393 ( %eline% echo Unsupported OS version detected [%winbuild%]. -echo KMS38 Activation is supported for Windows 10/11/Server, build 14393 and later. +echo KMS38 activation is only supported on Windows 10/11/Server, build 14393 and later. echo: if %winbuild% LSS 10240 ( -call :dk_color %Blue% "Use Online KMS Activation option." +call :dk_color %Blue% "Use Online KMS activation option." ) else ( -call :dk_color %Blue% "Use HWID Activation option." +call :dk_color %Blue% "Use HWID activation option." ) goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -198,8 +198,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -240,7 +240,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -299,14 +299,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -339,7 +339,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,0]" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,0]" choice /C:120 /N set _el=!errorlevel! if !_el!==3 exit /b @@ -369,7 +369,7 @@ if not exist %SysPath%\ClipUp.exe if not defined a_cor (set _fmiss=%_fmiss%ClipU if defined _fmiss ( %eline% -echo [%_fmiss%] file is missing. Aborting... +echo [%_fmiss%] file is missing, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -395,12 +395,12 @@ if defined _perm ( cls echo ___________________________________________________________________________________________ echo: -call :dk_color2 %_White% " " %Green% "Checking: %winos% is Permanently Activated." +call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated." call :dk_color2 %_White% " " %Gray% "Activation is not required." echo ___________________________________________________________________________________________ if %_unattended%==1 goto dk_done echo: -choice /C:10 /N /M "> [1] Activate [0] %_exitmsg% : " +choice /C:10 /N /M "> [1] Activate Anyway [0] %_exitmsg% : " if errorlevel 2 exit /b ) cls @@ -425,7 +425,7 @@ echo Server Evaluation cannot be activated. Convert it to full Server OS. echo: call :dk_color %Blue% "Go Back to main menu and use [Change Edition] option." ) else ( -echo Evaluation Editions cannot be activated outside of evaluation period. +echo Evaluation editions cannot be activated outside of their evaluation period. echo: set fixes=%fixes% %mas%evaluation_editions call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%evaluation_editions" @@ -441,9 +441,9 @@ goto dk_done if defined a_cor ( if not exist "!_work!\clipup.exe" ( %eline% -echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] version. -echo It's required for KMS38 Activation. -echo Check below page on how to activate it. +echo clipup.exe doesn't exist in Server Cor/Acor [No GUI] versions. +echo The file is required for KMS38 activation. +echo Check the below page for instructions on how to activate it. set fixes=%fixes% %mas%kms38 echo %mas%kms38 goto dk_done @@ -496,24 +496,24 @@ set /a UBR=0 if %osSKU%==191 if defined altkey if defined altedition ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b if %winbuild% LSS 22598 if !UBR! LSS 2788 ( -call :dk_color %Blue% "Windows must to be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation." +call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS KMS38 activation." ) ) if not defined key if defined notfoundaltactID ( -call :dk_color %Red% "Checking Alternate Edition For KMS38 [%altedition% Activation ID Not Found]" +call :dk_color %Red% "Checking Alternate Edition for KMS38 [%altedition% Activation ID Not Found]" ) if not defined key if not defined _gvlk ( %eline% echo [%winos% ^| %winbuild% ^| SKU:%osSKU%] if not defined skunotfound ( -echo This product does not support KMS38 Activation. -echo Make sure you are using updated version of the script. +echo This product does not support KMS38 activation. +echo Make sure you are using the latest version of the script. set fixes=%fixes% %mas% echo %mas% ) else ( -echo Required License files not found in %SysPath%\spp\tokens\skus\ +echo Required license files were not found in %SysPath%\spp\tokens\skus\ set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -527,12 +527,12 @@ goto dk_done echo: if defined changekey ( -call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable KMS38 activation." +call :dk_color %Blue% "[%altedition%] edition product key will be used to enable KMS38 activation." echo: ) if defined winsub ( -call :dk_color %Blue% "Windows Subscription [SKU ID-%slcSKU%] found. Script will activate base edition [SKU ID-%regSKU%]." +call :dk_color %Blue% "Windows Subscription edition [SKU ID-%slcSKU%] found. Script will activate the base edition [SKU ID-%regSKU%]." echo: ) @@ -629,7 +629,7 @@ set "sessionId=TwBTAE0AYQBqAG8AcgBWAGUAcgBzAGkAbwBuAD0ANQA7AE8AUwBNAGkAbgBvAHIAV copy /y /b "%tdir%\GenuineTicket" "%tdir%\GenuineTicket.xml" %nul% if not exist "%tdir%\GenuineTicket.xml" ( -call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting the process]" +call :dk_color %Red% "Generating GenuineTicket.xml [Failed, aborting...]" if exist "%tdir%\Genuine*" del /f /q "%tdir%\Genuine*" %nul% goto :k_final ) else ( @@ -656,7 +656,7 @@ call :dk_color %Gray% "Stopping sppsvc Service [Failed]" %_xmlexist% ( set error=1 if exist "%tdir%\*.xml" del /f /q "%tdir%\*.xml" %nul% -call :dk_color %Red% "Installing GenuineTicket.xml [Failed With ClipSVC Service Restart, Wait...]" +call :dk_color %Red% "Installing GenuineTicket.xml [Failed with ClipSVC service restart, wait...]" ) ) @@ -732,16 +732,16 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" :k_final -:: Remove the added Specific KMS Host (Local Host) if activation is not completed +:: Remove the specific KMS host (LocalHost) added by the script if activation is not completed echo: if not defined _k38 ( %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg delete "HKU\S-1-5-20\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -call :dk_color %Red% "Removing The Added Specific KMS Host [Failed]" +call :dk_color %Red% "Removing the Added Specific KMS Host [Failed]" ) || ( -echo Removing The Added Specific KMS Host [Successful] +echo Removing the Added Specific KMS Host [Successful] ) ) @@ -751,9 +751,9 @@ if defined _k38 ( %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':regdel\:.*';& ([ScriptBlock]::Create($f[1])) -protect" %nul% reg delete "HKLM\%specific_kms%" /f %nul% reg query "HKLM\%specific_kms%" && ( -echo Protect KMS38 From KMS [Successful] [Locked A Registry Key] +echo Protect KMS38 From KMS [Successful] [Locked a Registry Key] ) || ( -call :dk_color %Red% "Protect KMS38 From KMS [Failed To Lock A Registry Key]" +call :dk_color %Red% "Protect KMS38 From KMS [Failed to Lock a Registry Key]" ) ) @@ -763,9 +763,9 @@ if defined a_cor if exist "%_clipup%" del /f /q "%_clipup%" %nul% if defined a_cor ( if exist "%_clipup%" ( -call :dk_color %Red% "Deleting copied clipup.exe file [Failed]" +call :dk_color %Red% "Deleting Copied clipup.exe File [Failed]" ) else ( -echo Deleting copied clipup.exe file [Successful] +echo Deleting Copied clipup.exe File [Successful] ) ) @@ -1215,7 +1215,7 @@ set pupfound=%pupfound1%%pupfound2% set hcount=0 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=[AV URLs are blocked in hosts]" +if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]" set wucount=0 for %%# in (wuauserv) do ( @@ -1224,7 +1224,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1) ) ) -if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]" +if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]" sc start sppsvc %nul% echo "%errorlevel%" | findstr "577 225" %nul% && ( @@ -1235,7 +1235,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=% if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" -if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%" +if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." +if defined results call :dk_color %Red% "%results%" set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware" echo: @@ -1254,7 +1255,7 @@ call :dk_chkmal sc query Null %nul% || ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) @@ -1345,7 +1346,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart the system to fix this error." +call :dk_color %Blue% "Restart your system to fix this error." set showfix=1 ) ) @@ -1385,7 +1386,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]" +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" ) || ( echo Checking WPA Registry Count [%wpainfo%] ) @@ -1424,7 +1425,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( set error=1 -call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]" +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" ) ) ) @@ -1495,7 +1496,7 @@ echo Checking Eval WLMS Service [Found] reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( set error=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]" +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -1520,7 +1521,7 @@ set error=1 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) @@ -1550,9 +1551,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% if exist "%tokenstore%\" ( -call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]" +call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( -call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]" +call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" set error=1 set showfix=1 ) @@ -1670,7 +1671,7 @@ if ($osVersion.Build -ge $minBuildNumber) { } for ($i=1; $i -le $count; $i++) { if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Output "Total Keys $count. Error Found- $i key does not exist" + Write-Output "Total Keys $count. Error Found - $i key does not exist." $wpaKey.Close() exit } @@ -1681,7 +1682,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { if ($PSVersionTable.PSVersion.Major -lt 3) { cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1" if ($LASTEXITCODE -ne 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -1689,7 +1690,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { $subkey = $wpaKey.OpenSubKey($_) $p = $subkey.GetValueNames() if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -1728,13 +1729,13 @@ echo: if %_unattended%==1 timeout /t 2 & exit /b if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index f9b4e4b..a95601d 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -27,7 +27,7 @@ set "_debug=0" ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -160,15 +160,15 @@ call :dk_setvar if %winbuild% LSS 9200 ( %eline% echo Unsupported OS version detected [%winbuild%]. -echo Ohook Activation is supported on Windows 8 and later and their server equivalent. +echo Ohook Activation is supported only on Windows 8/10/11 and their server equivalents. echo: -call :dk_color %Blue% "Use Online KMS Activation option." +call :dk_color %Blue% "Use Online KMS activation option instead." goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -188,8 +188,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -230,7 +230,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -289,14 +289,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -332,7 +332,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b @@ -360,7 +360,7 @@ call :dk_chkmal if not exist %SysPath%\sppsvc.exe ( %eline% -echo [%SysPath%\sppsvc.exe] file is missing. Aborting... +echo [%SysPath%\sppsvc.exe] file is missing, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -456,10 +456,10 @@ call :dk_color %Red% "Checking Installed Office [Not Found]" if defined ohub ( echo: -echo You have only Office dashboard app installed, you need to install full Office version. +echo You only have the Office dashboard app installed, you need to install the full version of Office. ) echo: -call :dk_color %Blue% "Download and install Office from below URL and try again." +call :dk_color %Blue% "Download and install Office from the below URL and then try again." echo: set fixes=%fixes% %mas%genuine-installation-media call :dk_color %_Yellow% "%mas%genuine-installation-media" @@ -471,7 +471,7 @@ if not "%o16c2r%%o15c2r%%o16msi%%o15msi%"=="1" set multioffice=1 if not "%o14msi%%o14c2r%%o16uwp%"=="" set multioffice=1 if defined multioffice ( -call :dk_color %Gray% "Checking Multiple Office Install [Found. Recommended to install one version only]" +call :dk_color %Gray% "Checking Multiple Office Install [Found, its recommended to install only one version]" ) ::======================================================================================================================================== @@ -619,7 +619,7 @@ reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" /reg: ) reg delete "%kmskey%" /f %nul% reg add "%kmskey%" /f /v KeyManagementServiceName /t REG_SZ /d "10.0.0.10" %nul% -echo Adding a Reg To Prevent Banner [Successful] +echo Adding a Registry to Prevent Banner [Successful] ) ) @@ -667,7 +667,7 @@ call :oh_reset call :oh_getpath echo: -echo Uninstalling Ohook Activation... +echo Uninstalling Ohook activation... echo: if defined o16c2r_reg (for /f "skip=2 tokens=2*" %%a in ('"reg query %o16c2r_reg% /v InstallPath" %nul6%') do (set "_16CHook=%%b\root\vfs")) @@ -698,7 +698,7 @@ if exist "%%~A\Microsoft %%~G\root\vfs\%%#\sppc*dll" (set _present=1& del /s /f reg query HKCU\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && ( echo: -echo Deleting - Registry keys to skip license check from all ^& future new useraccounts +echo Deleting - Registry keys for skipping license check reg load HKU\DEF_TEMP %SystemDrive%\Users\Default\NTUSER.DAT %nul% reg query HKU\DEF_TEMP\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency %nul% && reg delete HKU\DEF_TEMP\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f @@ -723,7 +723,7 @@ reg unload HKU\%%# %nul% set "kmskey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\0ff1ce15-a989-479d-af46-f275c6370663" reg query "%kmskey%" %nul% && ( echo: -echo Deleting - Registry keys to prevent non-genuine banner +echo Deleting - Registry keys for preventing non-genuine banner reg delete "%kmskey%" /f ) @@ -735,16 +735,16 @@ echo ___________________________________________________________________________ echo: if not defined _present ( -echo Ohook Activation is not installed. +echo Ohook activation is not installed. ) else ( if defined _unerror ( call :dk_color %Red% "Failed to uninstall Ohook activation." call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If its still not resolved then restart system and try again." +call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." ) else ( -call :dk_color %Blue% "Restart system and try again." +call :dk_color %Blue% "Restart your system and try again." ) ) else ( call :dk_color %Green% "Successfully uninstalled Ohook activation." @@ -919,11 +919,11 @@ if not exist "%_hookPath%\sppc.dll" (if not defined ierror set ierror=Copy) echo: if not defined ierror ( -echo Symlinking System's sppc.dll To ["%_hookPath%\sppcs.dll"] [Successful] +echo Symlinking System's sppc.dll to ["%_hookPath%\sppcs.dll"] [Successful] if defined exhook ( -echo Copying Custom %_hook% To ["%_hookPath%\sppc.dll"] [Successful] +echo Copying Custom %_hook% to ["%_hookPath%\sppc.dll"] [Successful] ) else ( -echo Extracting Custom %_hook% To ["%_hookPath%\sppc.dll"] [Successful] +echo Extracting Custom %_hook% to ["%_hookPath%\sppc.dll"] [Successful] ) ) else ( set error=1 @@ -932,9 +932,9 @@ echo: call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If its still not resolved then restart system and try again." +call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." ) else ( -if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart system and try again." +if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system and try again." if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." ) echo: @@ -982,7 +982,7 @@ call :dk_inskey "[!key!] [!_prod!] [!_lic!]" ) else ( set error=1 call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !_prod! not found in script]" -call :dk_color %Blue% "Make sure you are using Latest MAS script." +call :dk_color %Blue% "Make sure you are using the latest version of MAS." set fixes=%fixes% %mas% call :dk_color %_Yellow% "%mas%" ) @@ -996,7 +996,7 @@ if defined winserver if defined _config ( 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]" +echo Adding SharedComputerLicensing Reg [Successful] [Needed on Server With Retail Office]" ) ) @@ -1043,13 +1043,13 @@ echo Activating Office... [MSI ^| %_version% ^| %_oArch%] if not defined _oBranding ( set error=1 -call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]" +call :dk_color %Red% "Checking BRANDING.XML [Not Found, aborting activation...]" exit /b ) if not defined _oIds ( set error=1 -call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]" +call :dk_color %Red% "Checking Installed Products [Product IDs not found, aborting activation...]" exit /b ) @@ -1190,7 +1190,7 @@ reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwarePr reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul% -echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts] +echo Clearing Office License Blocks [Successfully cleared from all %counter% user accounts] ::========================== @@ -1208,7 +1208,7 @@ for %%# in (%_sidlist%) do ( reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f %nul% reg add HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2040-01-01T00:00:00Z" /f %nul% ) -echo Adding Reg Keys To Skip License Check [Successfully Added To All %counter% ^& Future New Useraccounts] +echo Adding Reg Keys to Skip License Check [Successfully added to all %counter% ^& future new user accounts] ) ::========================== @@ -1222,14 +1222,14 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 -call :dk_color %Red% "Loading Unloaded accounts Registry [Failed For Some Useraccounts]" -call :dk_color %Blue% "Restart the system and try again." +call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" +call :dk_color %Blue% "Restart your system and try again." ) if defined failedtounload ( set error=1 -call :dk_color %Red% "Unloading loaded accounts Registry [Failed For Some Useraccounts]" -call :dk_color %Blue% "Restart the system and try again." +call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" +call :dk_color %Blue% "Restart your system and try again." ) exit /b @@ -1524,7 +1524,7 @@ set pupfound=%pupfound1%%pupfound2% set hcount=0 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=[AV URLs are blocked in hosts]" +if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]" set wucount=0 for %%# in (wuauserv) do ( @@ -1533,7 +1533,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1) ) ) -if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]" +if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]" sc start sppsvc %nul% echo "%errorlevel%" | findstr "577 225" %nul% && ( @@ -1544,7 +1544,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=% if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" -if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%" +if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." +if defined results call :dk_color %Red% "%results%" set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware" echo: @@ -1563,7 +1564,7 @@ call :dk_chkmal sc query Null %nul% || ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) @@ -1654,7 +1655,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart the system to fix this error." +call :dk_color %Blue% "Restart your system to fix this error." set showfix=1 ) ) @@ -1694,7 +1695,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]" +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" ) || ( echo Checking WPA Registry Count [%wpainfo%] ) @@ -1733,7 +1734,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( set error=1 -call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]" +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" ) ) ) @@ -1804,7 +1805,7 @@ echo Checking Eval WLMS Service [Found] reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( set error=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]" +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -1829,7 +1830,7 @@ set error=1 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) @@ -1859,9 +1860,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% if exist "%tokenstore%\" ( -call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]" +call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( -call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]" +call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" set error=1 set showfix=1 ) @@ -1979,7 +1980,7 @@ if ($osVersion.Build -ge $minBuildNumber) { } for ($i=1; $i -le $count; $i++) { if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Output "Total Keys $count. Error Found- $i key does not exist" + Write-Output "Total Keys $count. Error Found - $i key does not exist." $wpaKey.Close() exit } @@ -1990,7 +1991,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { if ($PSVersionTable.PSVersion.Major -lt 3) { cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1" if ($LASTEXITCODE -ne 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -1998,7 +1999,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { $subkey = $wpaKey.OpenSubKey($_) $p = $subkey.GetValueNames() if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -2037,13 +2038,13 @@ echo: if %_unattended%==1 timeout /t 2 & exit /b if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index ae3bc02..c906b8a 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -52,7 +52,7 @@ set "_debug=0" ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -191,13 +191,13 @@ call :dk_setvar if %winbuild% LSS 7600 ( %nceline% echo Unsupported OS version detected [%winbuild%]. -echo Project is supported for Windows 7/8/8.1/10/11 and their Server equivalent. +echo MAS only supports Windows 7/8/8.1/10/11 and their Server equivalents. goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -217,8 +217,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -259,7 +259,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -318,14 +318,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -385,7 +385,7 @@ echo [9] Download Office echo [0] %_exitmsg% echo ______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard [1,2,3,4,5,6,7,8,9,0]" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,4,5,6,7,8,9,0]" choice /C:1234567890 /N set _el=!errorlevel! @@ -420,7 +420,7 @@ call :dk_chkmal if not exist %SysPath%\sppsvc.exe ( %eline% -echo [%SysPath%\sppsvc.exe] file is missing. Aborting... +echo [%SysPath%\sppsvc.exe] file is missing, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -508,7 +508,7 @@ if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*EvalCorEditio if defined _eval ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID %nul2% | find /i "Eval" %nul1% && ( -call :dk_color %Red% "Checking Eval Edition [Evaluation Editions cannot be activated outside of evaluation period.]" +call :dk_color %Red% "Checking Evaluation Edition [Evaluation editions cannot be activated outside of evaluation period.]" if defined _evalserv ( call :dk_color %Blue% "Go back to main menu and use [Change Edition] option." @@ -546,7 +546,7 @@ set /a UBR=0 if %osSKU%==191 if defined altkey if defined altedition ( for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v UBR %nul6%') do if not errorlevel 1 set /a UBR=%%b if %winbuild% LSS 22598 if !UBR! LSS 2788 ( -call :dk_color %Blue% "Windows must to be updated to build 19044.2788 or higher for IotEnterpriseS %KS% activation." +call :dk_color %Blue% "Windows must be updated to build 19044.2788 or higher for IotEnterpriseS %KS% activation." ) ) @@ -557,11 +557,11 @@ call :dk_color %Red% "Checking Alternate Edition For %KS% [%altedition% Act if not defined key if not defined _gvlk ( echo [%winos% ^| %winbuild% ^| SKU:%osSKU%] if not defined skunotfound ( -echo This product does not support %KS% Activation. +echo This product does not support %KS% activation. set fixes=%fixes% %mas%unsupported_products_activation call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%unsupported_products_activation" ) else ( -echo Required License files not found in %SysPath%\spp\tokens\skus\ +echo Required license files not found in %SysPath%\spp\tokens\skus\ set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -574,7 +574,7 @@ goto :ks_office :: Install key if defined changekey ( -call :dk_color %Blue% "[%altedition%] Edition product key will be used to enable %KS% activation." +call :dk_color %Blue% "[%altedition%] edition product key will be used to enable %KS% activation." echo: ) @@ -1291,7 +1291,7 @@ reg delete "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwarePr reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\0ff1ce15-a989-479d-af46-f275c6370663" /f %nul% reg delete "HKU\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform\Policies\59a52881-a989-479d-af46-f275c6370663" /f %nul% -echo Clearing Office License Blocks [Successfully Cleared From All %counter% Useraccounts] +echo Clearing Office License Blocks [Successfully cleared from all %counter% user accounts] ::========================== @@ -1309,7 +1309,7 @@ for %%# in (%_sidlist%) do ( reg delete HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /f %nul% reg add HKU\%%#\Software\Microsoft\Office\16.0\Common\Licensing\Resiliency /v "TimeOfLastHeartbeatFailure" /t REG_SZ /d "2040-01-01T00:00:00Z" /f %nul% ) -echo Adding Reg Keys To Skip License Check [Successfully Added To All %counter% ^& Future New Useraccounts] +echo Adding Reg Keys to Skip License Check [Successfully added to all %counter% ^& future new user accounts] ) ::========================== @@ -1323,14 +1323,14 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 -call :dk_color %Red% "Loading Unloaded accounts Registry [Failed For Some Useraccounts]" -call :dk_color %Blue% "Restart the system and try again." +call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" +call :dk_color %Blue% "Restart your system and try again." ) if defined failedtounload ( set error=1 -call :dk_color %Red% "Unloading loaded accounts Registry [Failed For Some Useraccounts]" -call :dk_color %Blue% "Restart the system and try again." +call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" +call :dk_color %Blue% "Restart your system and try again." ) exit /b @@ -2573,7 +2573,7 @@ set pupfound=%pupfound1%%pupfound2% set hcount=0 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=[AV URLs are blocked in hosts]" +if %hcount%==4 set "results=[Antivirus URLs are blocked in hosts]" set wucount=0 for %%# in (wuauserv) do ( @@ -2582,7 +2582,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec reg query HKLM\SYSTEM\CurrentControlSet\Services\%%# /v %%G %nul% || (set _corrupt=1 & set /a wucount+=1) ) ) -if %wucount% GEQ 1 set "results=%results%[WU registry is corrupt]" +if %wucount% GEQ 1 set "results=%results%[Windows Update registry is corrupt]" sc start sppsvc %nul% echo "%errorlevel%" | findstr "577 225" %nul% && ( @@ -2593,7 +2593,8 @@ if not exist %SysPath%\sppsvc.exe if not exist %SysPath%\alg.exe (set "results=% if not "%results%%pupfound%"=="" ( if defined pupfound call :dk_color %Gray% "Checking PUP Activators [Found%pupfound%]" -if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection %results%" +if defined results call :dk_color %Red% "Checking Probable Mal%w%ware Infection..." +if defined results call :dk_color %Red% "%results%" set fixes=%fixes% %mas%remove_mal%w%ware call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%remove_mal%w%ware" echo: @@ -2612,7 +2613,7 @@ call :dk_chkmal sc query Null %nul% || ( set error=1 set showfix=1 -call :dk_color %Red% "Checking Sandboxing [Found. Script may not work properly.]" +call :dk_color %Red% "Checking Sandboxing [Found, script may not work properly.]" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." echo: ) @@ -2703,7 +2704,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart the system to fix this error." +call :dk_color %Blue% "Restart your system to fix this error." set showfix=1 ) ) @@ -2743,7 +2744,7 @@ for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':w echo "%wpainfo%" | find /i "Error Found" %nul% && ( set error=1 set wpaerror=1 -call :dk_color %Red% "Checking WPA Registry Error [%wpainfo%]" +call :dk_color %Red% "Checking WPA Registry Errors [%wpainfo%]" ) || ( echo Checking WPA Registry Count [%wpainfo%] ) @@ -2782,7 +2783,7 @@ call :dk_color %Red% "Checking License Files [Not Found] [%osed if not exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-*-%osedition%-*.mum" ( set error=1 -call :dk_color %Red% "Checking Package File [Not Found] [%osedition%]" +call :dk_color %Red% "Checking Package Files [Not Found] [%osedition%]" ) ) ) @@ -2853,7 +2854,7 @@ echo Checking Eval WLMS Service [Found] reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% || ( set error=1 -call :dk_color %Red% "Checking HKU\S-1-5-20 Reg [Not Found]" +call :dk_color %Red% "Checking HKU\S-1-5-20 Registry [Not Found]" set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) @@ -2878,7 +2879,7 @@ set error=1 reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Plugins\Objects\msft:rm/algorithm/hwid/4.0" /f ba02fed39662 /d %nul% || ( call :dk_color %Red% "Checking SPP Registry Key [Incorrect ModuleId Found]" set fixes=%fixes% %mas%issues_due_to_gaming_spoofers -call :dk_color2 %Blue% "Possibly Caused By Gaming Spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" +call :dk_color2 %Blue% "Most likely caused by HWID spoofers. Help - " %_Yellow% " %mas%issues_due_to_gaming_spoofers" set error=1 set showfix=1 ) @@ -2908,9 +2909,9 @@ set "d=!d! $AclObject.SetSecurityDescriptorSddlForm($sddl);" set "d=!d! Set-Acl -Path %tokenstore% -AclObject $AclObject;" %psc% "!d!" %nul% if exist "%tokenstore%\" ( -call :dk_color %Gray% "Checking SPP Token Folder [Not Found. Created Now] [%tokenstore%\]" +call :dk_color %Gray% "Checking SPP Token Folder [Not Found, Created Now] [%tokenstore%\]" ) else ( -call :dk_color %Red% "Checking SPP Token Folder [Not Found. Failed To Create] [%tokenstore%\]" +call :dk_color %Red% "Checking SPP Token Folder [Not Found, Failed to Create] [%tokenstore%\]" set error=1 set showfix=1 ) @@ -3028,7 +3029,7 @@ if ($osVersion.Build -ge $minBuildNumber) { } for ($i=1; $i -le $count; $i++) { if (-not $subkeyHashTable.ContainsKey("$i")) { - Write-Output "Total Keys $count. Error Found- $i key does not exist" + Write-Output "Total Keys $count. Error Found - $i key does not exist." $wpaKey.Close() exit } @@ -3039,7 +3040,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { if ($PSVersionTable.PSVersion.Major -lt 3) { cmd /c "reg query "HKLM\SYSTEM\WPA\$_" /ve /t REG_BINARY >nul 2>&1" if ($LASTEXITCODE -ne 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -3047,7 +3048,7 @@ $wpaKey.GetSubKeyNames() | ForEach-Object { $subkey = $wpaKey.OpenSubKey($_) $p = $subkey.GetValueNames() if (($p | Where-Object { $subkey.GetValueKind($_) -eq [Microsoft.Win32.RegistryValueKind]::Binary }).Count -eq 0) { - Write-Host "Total Keys $count. Error Found- Binary Data is corrupt" + Write-Host "Total Keys $count. Error Found - Binary Data is corrupt." $wpaKey.Close() exit } @@ -3086,13 +3087,13 @@ echo: if %_unattended%==1 timeout /t 2 & exit /b if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Change_Edition.cmd b/MAS/Separate-Files-Version/Change_Edition.cmd index 07855b1..3f84673 100644 --- a/MAS/Separate-Files-Version/Change_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Edition.cmd @@ -19,7 +19,7 @@ set _stg=0 ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -127,13 +127,13 @@ set "line=echo _________________________________________________________________ if %winbuild% LSS 7600 ( %nceline% echo Unsupported OS version detected [%winbuild%]. -echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. +echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents. goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -153,8 +153,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -195,7 +195,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -254,14 +254,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -280,7 +280,7 @@ if not defined desktop for /f "delims=" %%a in ('%psc% "& {write-host $([Environ if not defined desktop ( %eline% -echo Desktop location was not detected, aborting... +echo Unable to detect Desktop location, aborting... goto dk_done ) @@ -302,7 +302,7 @@ dism.exe ) do ( if not exist %SysPath%\%%# ( %eline% -echo [%SysPath%\%%#] file is missing. Aborting... +echo [%SysPath%\%%#] file is missing, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -335,7 +335,7 @@ if defined UBR (set "fullbuild=%%G.!UBR!") else (set "fullbuild=%%G.%%H") call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f if not defined apps ( %eline% -echo Either key is not insalled or failed to get installed key activation ID. Aborting... +echo Either key is not insalled or script failed to get installed key's activation ID. Aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -356,7 +356,7 @@ if %_wmic% EQU 0 set "chkedi=for /f "tokens=2 delims==" %%a in ('%psc% "(([WMISE if %osedition%==0 ( %eline% -echo Failed to detect OS Edition. Aborting... +echo Failed to detect OS edition, aborting... echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -376,7 +376,7 @@ for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT ::======================================================================================================================================== -:: Get Target editions list +:: Get target editions list set _target= set _dtarget= @@ -403,9 +403,9 @@ call :dk_color %Red% "==== Note ====" echo: echo [EditionID:%osedition% ^| %fullbuild%] echo: -echo Changing this edition to any other may not remove "%osedition%" specific features. +echo Changing this edition may not remove "%osedition%"-specific features. echo: -call :dk_color %_Yellow% "Press 7 key to continue..." +call :dk_color %_Yellow% "Press [7] to continue anyway..." choice /c 7 /n cls ) @@ -424,7 +424,7 @@ if not defined _ntarget ( %line% echo: if defined dismnotworking call :dk_color %Red% "DISM.exe is not working." -call :dk_color %Gray% "Target Edition not found." +call :dk_color %Gray% "Target editions not found." echo Current Edition [%osedition% ^| %winbuild%] can not be changed to any other Edition. %line% goto dk_done @@ -443,7 +443,7 @@ set targetedition= %line% echo: -call :dk_color %Gray% "You can change the Edition [%osedition%] [%fullbuild%] to one of the following." +call :dk_color %Gray% "You can change the edition [%osedition%] [%fullbuild%] to one of the following." %showeditionerror% if defined dismnotworking ( call :dk_color %_Yellow% "Note - DISM.exe is not working." @@ -462,7 +462,7 @@ set targetedition!counter!=%%A echo: echo [0] %_exitmsg% echo: -call :dk_color %_Green% "Enter option number in keyboard, and press "Enter":" +call :dk_color %_Green% "Enter an option number using your keyboard and press Enter to confirm:" set /p inpt= if "%inpt%"=="" goto cedmenu2 if "%inpt%"=="0" exit /b @@ -483,12 +483,12 @@ echo: call :dk_color %Red% "==== Note ====" echo: echo Once the edition is changed to "%targetedition%", -echo system may not be able to properly change edition to any other later. +echo the system may not be able to properly change edition later. echo: -echo [1] Continue +echo [1] Continue Anyway echo [0] Go Back echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 goto cedmenu2 if !errorlevel!==1 rem @@ -499,7 +499,7 @@ set key= set _chan= set _dismapi=0 -:: Check if DISM Api or slmgr.vbs is required for edition upgrade +:: Check if DISM API or slmgr.vbs is required for edition upgrade if not exist "%SysPath%\spp\tokens\skus\%targetedition%\" ( echo %_wtarget% | find /i " %targetedition% " || ( @@ -521,7 +521,7 @@ set _chan=Retail if not defined key ( %eline% echo [%targetedition% ^| %winbuild%] -echo Unable to get product key from pkeyhelper.dll +echo Failed to get product key from pkeyhelper.dll. echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -544,13 +544,13 @@ cls echo: %showeditionerror% if defined dismnotworking call :dk_color %_Yellow% "DISM.exe is not working." -echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%] +echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]... echo: if %_dismapi%==1 ( -call :dk_color %Green% "Notes-" +call :dk_color %Green% "Notes -" echo: -echo - Save your work before continue, system will auto restart. +echo - Save your work before continuing, the system will auto-restart. echo: echo - You will need to activate with HWID option once the edition is changed. %line% @@ -562,7 +562,7 @@ if !errorlevel!==1 exit /b ::======================================================================================================================================== if %_dismapi%==0 ( -echo Installing %_chan% Key [%key%] +echo Installing %_chan% key [%key%] echo: if %_wmic% EQU 1 wmic path %sps% where __CLASS='%sps%' call InstallProductKey ProductKey="%key%" %nul% if %_wmic% EQU 0 %psc% "try { $null=(([WMISEARCHER]'SELECT Version FROM %sps%').Get()).InstallProductKey('%key%'); exit 0 } catch { exit $_.Exception.InnerException.HResult }" %nul% @@ -574,7 +574,7 @@ if !keyerror! EQU 0 ( call :dk_refresh call :dk_color %Green% "[Successful]" echo: -call :dk_color %Gray% "Reboot is required to properly change the Edition." +call :dk_color %Gray% "Reboot is required to fully change the edition." ) else ( call :dk_color %Red% "[Unsuccessful] [Error Code: !keyerror!]" echo: @@ -585,7 +585,7 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" if %_dismapi%==1 ( echo: -echo Applying the DISM API method with %_chan% Key %key%. Please wait... +echo Applying the DISM API method with %_chan% key %key%. Please wait... echo: call :ced_prep @@ -614,9 +614,9 @@ if defined rebootreq goto dk_done echo: %showeditionerror% if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working." -echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%] +echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]... echo: -call :dk_color %Blue% "Important - Save your work before continue, system will auto reboot." +call :dk_color %Blue% "Important - Save your work before continuing, the system will auto-restart." echo: choice /C:01 /N /M "[1] Continue [0] %_exitmsg% : " if %errorlevel%==1 exit /b @@ -657,7 +657,7 @@ if not defined key call :changeeditiondata if not defined key ( %eline% echo [%targetedition% ^| %winbuild%] -echo Unable to get product key from pkeyhelper.dll +echo Failed to get product key from pkeyhelper.dll. echo: set fixes=%fixes% %mas%troubleshoot call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" @@ -671,13 +671,13 @@ cls echo: %showeditionerror% if defined dismnotworking call :dk_color %_Yellow% "Note - DISM.exe is not working." -echo Changing the Current Edition [%osedition%] %fullbuild% to [%targetedition%] +echo Changing the current edition [%osedition%] %fullbuild% to [%targetedition%]... echo: call :ced_prep if defined preperror goto dk_done -echo Applying the command with %_chan% Key +echo Applying the command with %_chan% key... echo DISM /online /Set-Edition:%targetedition% /ProductKey:%key% /AcceptEula DISM /online /Set-Edition:%targetedition% /ProductKey:%key% /AcceptEula @@ -699,8 +699,8 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time sc query TrustedInstaller | find /i "RUNNING" %nul% && ( %eline% -echo Failed to stop TrustedInstaller service. -echo Try again or Restart your system and then try again. +echo Failed to stop the TrustedInstaller service. +echo Restart your system and try again. set preperror=1 exit /b ) @@ -731,9 +731,9 @@ call :compresslog DISM\dism_%_time%.log ChangeEdition_Logs\DISM %nul% echo: if %winbuild% GEQ 9200 %psc% "if ((Get-WindowsOptionalFeature -Online -FeatureName NetFx3).State -eq 'Enabled') {Write-Host 'Checking .NET Framework 3.5 Status - Enabled'}" -echo Log files are copied to the ChangeEdition_Logs folder on the desktop. +echo Log files are copied to the ChangeEdition_Logs folder on your desktop. echo: -call :dk_color %Blue% "In case of errors, restart system before trying again." +call :dk_color %Blue% "In case there are errors, you should restart the system before trying again." echo: set fixes=%fixes% %mas%change_edition_issues call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%change_edition_issues" @@ -891,7 +891,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Upd if defined rebootreq ( %eline% -echo Pending Reboot flags found. +echo Pending reboot flags found. echo: echo Make sure Windows is fully updated, restart the system and try again. ) @@ -987,13 +987,13 @@ echo: if %_unattended%==1 timeout /t 2 & exit /b if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index d09a792..2fb6381 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -14,7 +14,7 @@ ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -121,13 +121,13 @@ call :dk_setvar if %winbuild% LSS 7600 ( %nceline% echo Unsupported OS version detected [%winbuild%]. -echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. +echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents. goto done2 ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -147,8 +147,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto done2 @@ -189,7 +189,7 @@ goto done2 if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto done2 ) @@ -248,14 +248,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -277,7 +277,7 @@ set "_dir=%desktop%\$OEM$\$$\Setup\Scripts" if exist "!desktop!\" ( %eline% -echo Desktop location was not detected, aborting... +echo Unable to detect Desktop location, aborting... goto done2 ) @@ -290,7 +290,7 @@ if not defined terminal mode 78, 30 if exist "!desktop!\$OEM$\" ( echo _____________________________________________________ %eline% -echo $OEM$ folder already exists on the Desktop. +echo The $OEM$ folder already exists on your Desktop. echo _____________________________________________________ goto done2 ) @@ -349,7 +349,7 @@ call :dk_color2 %_White% " [R] " %_Green% "ReadMe" echo: [0] Exit echo: ________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :" choice /C:123456789R0 /N set _erl=%errorlevel% @@ -681,7 +681,7 @@ cd \ :errorfound %eline% -echo $OEM$ Folder was not created successfully... +echo The script failed to create the $OEM$ folder. goto :done2 :done @@ -689,7 +689,7 @@ goto :done2 echo ______________________________________________________________ echo: call :dk_color %Blue% "%oem%" -call :dk_color %Green% "$OEM$ folder is successfully created on the Desktop." +call :dk_color %Green% "$OEM$ folder was successfully created on your Desktop." echo "%oem%" | find /i "38" %nul% && ( echo: echo To KMS38 activate Server Cor/Acor editions ^(No GUI Versions^), @@ -701,13 +701,13 @@ echo ______________________________________________________________ echo: if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to Open Troubleshoot Page " %Gray% " Press [0] to Ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 873032f..2017d8c 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -14,7 +14,7 @@ ::======================================================================================================================================== -:: Set Environment variables, it helps if they are misconfigured in the system +:: Set environment variables, it helps if they are misconfigured in the system setlocal EnableExtensions setlocal DisableDelayedExpansion @@ -122,13 +122,13 @@ set "line=______________________________________________________________________ if %winbuild% LSS 7600 ( %nceline% echo Unsupported OS version detected [%winbuild%]. -echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalent. +echo Project is supported only for Windows 7/8/8.1/10/11 and their Server equivalents. goto dk_done ) ::======================================================================================================================================== -:: Fix special characters limitation in path name +:: Fix special character limitations in path name set "_work=%~dp0" if "%_work:~-1%"=="\" set "_work=%_work:~0,-1%" @@ -148,8 +148,8 @@ setlocal EnableDelayedExpansion echo "!_batf!" | find /i "!_ttemp!" %nul1% && ( if /i not "!_work!"=="!_ttemp!" ( %eline% -echo Script is launched from the temp folder, -echo Most likely you are running the script directly from the archive file. +echo The script was launched from the temp folder. +echo You are most likely running the script directly from the archive file. echo: echo Extract the archive file and launch the script from the extracted folder. goto dk_done @@ -190,7 +190,7 @@ goto dk_done if not defined _elev %psc% "start cmd.exe -arg '/c \"!_PSarg!\"' -verb runas" && exit /b %eline% echo This script needs admin rights. -echo To do so, right click on this script and select 'Run as administrator'. +echo Right click on this script and select 'Run as administrator'. goto dk_done ) @@ -249,14 +249,14 @@ if not "%%#"=="" (echo "%%#" | find "127.69" %nul1% && (echo "%%#" | find "127.6 if defined old ( echo ________________________________________________ %eline% -echo Version %masver% of MAS is outdated. +echo Your version of MAS [%masver%] is outdated. echo ________________________________________________ echo: if not %_unattended%==1 ( echo [1] Get Latest MAS echo [0] Continue Anyway echo: -call :dk_color %_Green% "Enter a menu option in the Keyboard [1,0] :" +call :dk_color %_Green% "Choose a menu option using your keyboard [1,0] :" choice /C:10 /N if !errorlevel!==2 rem if !errorlevel!==1 (start ht%-%tps://github.com/mass%-%gravel/Microsoft-Acti%-%vation-Scripts & start %mas% & exit /b) @@ -275,7 +275,7 @@ if not defined desktop for /f "delims=" %%a in ('%psc% "& {write-host $([Environ if not defined desktop ( %eline% -echo Desktop location was not detected, aborting... +echo Unable to detect Desktop location, aborting... goto dk_done ) @@ -310,7 +310,7 @@ echo: echo: [0] %_exitmsg% echo: _______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Enter a menu option in the Keyboard :" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard :" choice /C:1234560 /N set _erl=%errorlevel% @@ -333,8 +333,8 @@ title Dism /English /Online /Cleanup-Image /RestoreHealth if %winbuild% LSS 9200 ( %eline% -echo Unsupported OS version Detected. -echo This command is supported only for Windows 8/8.1/10/11 and their Server equivalent. +echo Unsupported OS version detected. +echo This command only works on Windows 8/8.1/10/11 and their Server equivalents. goto :at_back ) @@ -352,14 +352,14 @@ call :dk_color2 %_White% " " %Red% "Checking Internet Connection [Not conne echo %line% echo: -echo Dism uses Windows Update to provide the files required to fix corruption. +echo DISM uses Windows Update to provide replacement files required to fix corruption. echo This will take 5-15 minutes or more.. echo %line% echo: echo Notes: echo: -call :dk_color2 %_White% " - " %Gray% "Make sure the Internet is connected." -call :dk_color2 %_White% " - " %Gray% "Make sure the Windows update is properly working." +call :dk_color2 %_White% " - " %Gray% "Make sure the internet is connected." +call :dk_color2 %_White% " - " %Gray% "Make sure that Windows update is properly working." echo: echo %line% echo: @@ -379,7 +379,7 @@ del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul% del /f /q "%SystemRoot%\logs\DISM\dism.log" %nul% echo: -echo Applying the command, +echo Applying the command... echo dism /english /online /cleanup-image /restorehealth dism /english /online /cleanup-image /restorehealth @@ -400,7 +400,7 @@ copy /y /b "%SystemRoot%\logs\DISM\dism.log" "!desktop!\AT_Logs\RHealth_DISM_%_t ) echo: -call :dk_color %Gray% "CBS and DISM logs are copied to the AT_Logs folder on the desktop." +call :dk_color %Gray% "CBS and DISM logs are copied to the AT_Logs folder on your desktop." goto :at_back ::======================================================================================================================================== @@ -414,7 +414,8 @@ title sfc /scannow echo: echo %line% echo: -echo System File Checker will repair missing or corrupted system files. +echo SFC will repair missing or corrupted system files. +echo It is recommended you run the DISM option first before this one. echo This will take 10-15 minutes or more.. echo: echo If SFC could not fix something, then run the command again to see if it may be able @@ -435,7 +436,7 @@ copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "%SystemRoot%\logs\cbs\backup_cbs_%_t del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul% echo: -echo Applying the command, +echo Applying the command... echo sfc /scannow sfc /scannow @@ -450,7 +451,7 @@ copy /y /b "%SystemRoot%\logs\cbs\cbs.log" "!desktop!\AT_Logs\SFC_CBS_%_time%.lo ) echo: -call :dk_color %Gray% "CBS log is copied to the AT_Logs folder on the desktop." +call :dk_color %Gray% "The CBS log was copied to the AT_Logs folder on your Desktop." goto :at_back ::======================================================================================================================================== @@ -469,17 +470,17 @@ echo %line% echo: echo Notes: echo: -echo - It helps in troubleshooting activation issues. +echo - This option helps in troubleshooting activation issues. echo: -echo - This option will, -echo - Deactivate Windows and Office, you may need to reactivate -echo If Windows is activated with motherboard / OEM / Digital license then don't worry +echo - This option will: +echo - Deactivate Windows and Office, you may need to reactivate. +echo If Windows is activated with motherboard / OEM / Digital license then Windows will activate itself again. echo: -echo - Clear ClipSVC, SPP and OSPP licenses -echo - Fix SPP permissions of tokens folder and registries +echo - Clear ClipSVC, SPP and OSPP licenses. +echo - Fix permissions of SPP tokens folder and registries. echo - Trigger the repair option for Office. echo: -call :dk_color2 %_White% " - " %Red% "Apply it only when it is necessary." +call :dk_color2 %_White% " - " %Red% "Apply this option only when it is necessary." echo: echo %line% echo: @@ -496,11 +497,11 @@ cls echo: echo %line% echo: -call :dk_color %Blue% "Rebuilding ClipSVC Licences" +call :dk_color %Blue% "Rebuilding ClipSVC Licenses..." echo: if %winbuild% LSS 10240 ( -echo ClipSVC Licence rebuilding is supported only on Win 10/11 and Server equivalent. +echo ClipSVC license rebuilding is supported only on Windows 10/11 and their Server equivalents. echo Skipping... goto :rebuildspptok ) @@ -516,7 +517,7 @@ echo Stopping ClipSVC service... timeout /t 2 %nul% echo: -echo Applying the command to Clean ClipSVC Licences... +echo Applying the command to clean ClipSVC Licenses... echo rundll32 clipc.dll,ClipCleanUpState rundll32 clipc.dll,ClipCleanUpState @@ -545,15 +546,15 @@ echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( call :dk_color %Red% "[Failed]" -echo Restart the system, that will delete this registry key automatically. +echo Restart your system, that will delete this registry key automatically. ) || ( echo [Successful] ) -:: Clear HWID token related registry to fix activation incase if there is any corruption +:: Clear HWID token related registry to fix activation incase there is any corruption echo: -echo Deleting a IdentityCRL Registry Key... +echo Deleting IdentityCRL Registry Key... echo [%_ident%] reg delete "%_ident%" /f %nul% reg query "%_ident%" %nul% && ( @@ -568,7 +569,7 @@ echo [Successful] echo: if %winbuild% GTR 10240 ( -echo Deleting Folder %ProgramData%\Microsoft\Windows\ClipSVC\ +echo Deleting folder %ProgramData%\Microsoft\Windows\ClipSVC\ rmdir /s /q "C:\ProgramData\Microsoft\Windows\ClipSvc" %nul% if exist "%ProgramData%\Microsoft\Windows\ClipSVC\" ( @@ -578,7 +579,7 @@ echo [Successful] ) echo: -echo Rebuilding Folder %ProgramData%\Microsoft\Windows\ClipSVC\ +echo Rebuilding the %ProgramData%\Microsoft\Windows\ClipSVC\ folder... %psc% Start-Service ClipSVC %nul% timeout /t 3 %nul% if not exist "%ProgramData%\Microsoft\Windows\ClipSVC\" timeout /t 5 %nul% @@ -590,7 +591,7 @@ echo [Successful] ) echo: -echo Restarting [wlidsvc LicenseManager] services... +echo Restarting wlidsvc ^& LicenseManager services... for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } | Wait-Job -Timeout 10 | Out-Null") ::======================================================================================================================================== @@ -602,7 +603,7 @@ for %%# in (wlidsvc LicenseManager) do (%psc% "Start-Job { Restart-Service %%# } echo: echo %line% echo: -call :dk_color %Blue% "Rebuilding SPP Licensing Tokens" +call :dk_color %Blue% "Rebuilding SPP licensing tokens..." echo: call :scandat check @@ -684,7 +685,7 @@ echo: ) echo: -echo Reinstalling System Licenses... +echo Reinstalling system licenses... %psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% if %errorlevel% NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul% if %errorlevel% EQU 0 ( @@ -697,7 +698,7 @@ call :scandat check echo: if not defined token ( -call :dk_color %Red% "Failed to rebuilt tokens.dat file." +call :dk_color %Red% "Failed to rebuild tokens.dat file." ) else ( echo tokens.dat file was rebuilt successfully. ) @@ -713,11 +714,11 @@ sc config sppuinotify start= demand echo: echo %line% echo: -call :dk_color %Blue% "Rebuilding OSPP Licensing Tokens" +call :dk_color %Blue% "Rebuilding OSPP licensing tokens..." echo: sc qc osppsvc %nul% || ( -echo OSPP based Office is not installed +echo OSPP-based Office is not installed. echo Skipping rebuilding OSPP tokens... goto :repairoffice ) @@ -745,7 +746,7 @@ echo: ) echo: -echo Starting osppsvc service to generate tokens.dat +echo Starting osppsvc service to generate tokens.dat... %psc% Start-Service osppsvc %nul% call :scandatospp check if not defined token ( @@ -758,7 +759,7 @@ call :scandatospp check echo: if not defined token ( -call :dk_color %Red% "Failed to rebuilt tokens.dat file." +call :dk_color %Red% "Failed to rebuild tokens.dat file." ) else ( echo tokens.dat file was rebuilt successfully. ) @@ -770,7 +771,7 @@ echo tokens.dat file was rebuilt successfully. echo: echo %line% echo: -call :dk_color %Blue% "Repairing Office Licenses" +call :dk_color %Blue% "Repairing Office licenses..." echo: for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE') do set arch=%%b @@ -837,8 +838,8 @@ set /a counter+=1 if %counter% GTR 1 ( %eline% -echo Multiple office versions found. -echo It's recommended to install only one version of office. +echo Multiple Office versions found. +echo It is recommended to only install one version of Office. echo ________________________________________________________________ echo: ) @@ -850,9 +851,9 @@ goto :repairend echo: ) else ( echo: -call :dk_color %_Yellow% "A Window will popup, in that Window you need to select [Quick] Repair Option..." +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 key to continue..." +call :dk_color %_Yellow% "Press [0] to continue..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to continue..." @@ -862,8 +863,8 @@ pause %nul1% if defined uwp16 ( echo: -echo Note: Skipping repair for Office 16.0 UWP. -echo You need to use reset option in Windows settings for it. +echo Note: Skipping repair for Office 16.0 UWP... +echo You need to use the Reset option in Windows Settings instead. echo ________________________________________________________________ echo: start ms-settings:appsfeatures @@ -875,8 +876,8 @@ if defined c2r14_86 set c2r14=1 if defined c2r14 ( echo: -echo Note: Skipping repair for Office 14.0 C2R -echo You need to use Repair option in Windows settings for it. +echo Note: Skipping repair for Office 14.0 C2R... +echo You need to use the Repair option in Windows Settings for it. echo ________________________________________________________________ echo: start appwiz.cpl @@ -923,7 +924,7 @@ title Fix WMI if exist "%SystemRoot%\Servicing\Packages\Microsoft-Windows-Server*Edition~*.mum" ( %eline% -echo WMI rebuild is not recommended on Windows Server. Aborting... +echo Rebuilding WMI is not recommended on Windows Server, aborting... goto :at_back ) @@ -941,7 +942,7 @@ call :checkwmi if not defined error ( echo [Working] -echo No need to apply this option. Aborting... +echo No need to apply this option, aborting... goto :at_back ) @@ -956,7 +957,7 @@ for %%G in (DependOnService Description DisplayName ErrorControl ImagePath Objec echo: if defined _corrupt ( %eline% -echo Winmgmt service is corrupted. Aborting... +echo Winmgmt service is corrupted, aborting... goto :at_back ) @@ -1078,7 +1079,7 @@ echo: echo %line% echo: if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." @@ -1122,7 +1123,7 @@ exit /b :checkperms -:: This code checks if SPP has permission access to tokens folder and required registry keys. It's often caused by gaming spoofers. +:: This code checks if SPP has permission access to tokens folder and required registry keys. Incorrect permissions are often set by gaming spoofers. set permerror= if not exist "%tokenstore%\" set "permerror=Error Found In Token Folder" @@ -1370,13 +1371,13 @@ $key.SetAccessControl($acl) echo: if defined fixes ( -call :dk_color2 %Blue% "Press [1] To Open Troubleshoot Page " %Gray% " Press [0] To Ignore" +call :dk_color2 %Blue% "Press [1] to open Troubleshoot page " %Gray% " Press [0] to ignore" choice /C:10 /N if !errorlevel!==1 (for %%# in (%fixes%) do (start %%#)) ) if defined terminal ( -call :dk_color %_Yellow% "Press 0 key to %_exitmsg%..." +call :dk_color %_Yellow% "Press [0] key to %_exitmsg%..." choice /c 0 /n ) else ( call :dk_color %_Yellow% "Press any key to %_exitmsg%..." -- cgit v1.2.3 From 8e3b4135f56d14b86ccaa96014bc5eb9b6b5f80d Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Wed, 28 Aug 2024 08:30:14 +0530 Subject: Fix text alignment --- MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index a95601d..78e7912 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -332,7 +332,7 @@ echo: echo [0] %_exitmsg% echo ____________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,0]" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,0]" choice /C:1230 /N set _el=!errorlevel! if !_el!==4 exit /b diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index c906b8a..70f1359 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -385,7 +385,7 @@ echo [9] Download Office echo [0] %_exitmsg% echo ______________________________________________________________ echo: -call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,4,5,6,7,8,9,0]" +call :dk_color2 %_White% " " %_Green% "Choose a menu option using your keyboard [1,2,3,4,5,6,7,8,9,0]" choice /C:1234567890 /N set _el=!errorlevel! diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 2017d8c..84e9f65 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -474,7 +474,8 @@ echo - This option helps in troubleshooting activation issues. echo: echo - This option will: echo - Deactivate Windows and Office, you may need to reactivate. -echo If Windows is activated with motherboard / OEM / Digital license then Windows will activate itself again. +echo If Windows is activated with motherboard / OEM / Digital license +echo then Windows will activate itself again. echo: echo - Clear ClipSVC, SPP and OSPP licenses. echo - Fix permissions of SPP tokens folder and registries. -- cgit v1.2.3 From f9f386a896f1b4233b806d28d7901b942aff6329 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Fri, 30 Aug 2024 02:58:38 +0530 Subject: Detect SPP's PerfOptions registry in IFEO, and remove it in troubleshoot script --- MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd | 21 ++++++++++++++++++--- .../Activators/HWID_Activation.cmd | 12 +++++++++--- .../Activators/KMS38_Activation.cmd | 12 +++++++++--- .../Activators/Ohook_Activation_AIO.cmd | 12 +++++++++--- .../Activators/Online_KMS_Activation.cmd | 12 +++++++++--- MAS/Separate-Files-Version/Troubleshoot.cmd | 9 +++++++++ 6 files changed, 63 insertions(+), 15 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd b/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd index 848cc7d..069f43c 100644 --- a/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd +++ b/MAS/All-In-One-Version/MAS_AIO-CRC32_43EF5026.cmd @@ -1594,11 +1594,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1679,7 +1685,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) @@ -7848,6 +7854,15 @@ echo: echo Stopping sppsvc service... %psc% Stop-Service sppsvc -force %nul% +set w= +set _sppint= +for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (set _sppint=1)) +if defined _sppint ( +echo: +echo Removing SPP IFEO registry keys... +for %%# in (SppE%w%xtComObj.exe sppsvc.exe) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%) +) + if %winbuild% LSS 9200 ( REM Fix issues caused by Update KB971033 in Windows 7 REM https://support.microsoft.com/help/4487266 diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 04d0023..c520226 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1359,11 +1359,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1444,7 +1450,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 20f3766..ff2db4d 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1502,11 +1502,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1587,7 +1593,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 78e7912..f15a121 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1811,11 +1811,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -1896,7 +1902,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 70f1359..f5eaf72 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -2860,11 +2860,17 @@ call :dk_color2 %Blue% "Help - " %_Yellow% " %mas%troubleshoot" ) -for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do ( +for %%# in (SppEx%w%tComObj.exe sppsvc.exe sppsvc.exe\PerfOptions) do ( reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (if defined _sppint (set "_sppint=!_sppint!, %%#") else (set "_sppint=%%#")) ) if defined _sppint ( -echo Checking SPP Interference In IFEO [%_sppint%] +echo %_sppint% | find /i "PerfOptions" %nul% && ( +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +if not defined showfix call :dk_color %Blue% "%_fixmsg%" +set showfix=1 +) || ( +echo Checking SPP In IFEO [%_sppint%] +) ) @@ -2945,7 +2951,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" ) ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 84e9f65..ae67278 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -648,6 +648,15 @@ echo: echo Stopping sppsvc service... %psc% Stop-Service sppsvc -force %nul% +set w= +set _sppint= +for %%# in (SppEx%w%tComObj.exe sppsvc.exe) do (reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" %nul% && (set _sppint=1)) +if defined _sppint ( +echo: +echo Removing SPP IFEO registry keys... +for %%# in (SppE%w%xtComObj.exe sppsvc.exe) do (reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu%w%tion Options\%%#" /f %nul%) +) + if %winbuild% LSS 9200 ( REM Fix issues caused by Update KB971033 in Windows 7 REM https://support.microsoft.com/help/4487266 -- cgit v1.2.3 From 00e81be52f4acc3a5e12be1e247797fa610108f9 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Sep 2024 02:39:12 +0530 Subject: Reword some sentences --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 22 +++++++++++----------- .../Activators/HWID_Activation.cmd | 6 +++--- .../Activators/KMS38_Activation.cmd | 6 +++--- .../Activators/Ohook_Activation_AIO.cmd | 18 +++++++++--------- .../Activators/Online_KMS_Activation.cmd | 10 +++++----- .../Change_Windows_Edition.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 3f75b5e..3649af5 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1438,7 +1438,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system to fix this error." +call :dk_color %Blue% "Restart your system using restart button to fix this error." set showfix=1 ) ) @@ -1599,7 +1599,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu ) if defined _sppint ( echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" if not defined showfix call :dk_color %Blue% "%_fixmsg%" set showfix=1 ) || ( @@ -1685,7 +1685,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" ) ) @@ -2441,9 +2441,9 @@ call :dk_color %Red% "Failed to uninstall Ohook activation." call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." +call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." ) else ( -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) ) else ( call :dk_color %Green% "Successfully uninstalled Ohook activation." @@ -2631,9 +2631,9 @@ echo: call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." +call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." ) else ( -if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system and try again." +if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system using restart button and try again." if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." ) echo: @@ -2922,13 +2922,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) exit /b @@ -7649,7 +7649,7 @@ echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( call :dk_color %Red% "[Failed]" -echo Restart your system, that will delete this registry key automatically. +echo Restart your system using restart button, that will delete this registry key automatically. ) || ( echo [Successful] ) @@ -8871,7 +8871,7 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time sc query TrustedInstaller | find /i "RUNNING" %nul% && ( %eline% echo Failed to stop the TrustedInstaller service. -echo Restart your system and try again. +echo Restart your system using restart button and try again. set preperror=1 exit /b ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index c520226..2899e72 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1203,7 +1203,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system to fix this error." +call :dk_color %Blue% "Restart your system using restart button to fix this error." set showfix=1 ) ) @@ -1364,7 +1364,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu ) if defined _sppint ( echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" if not defined showfix call :dk_color %Blue% "%_fixmsg%" set showfix=1 ) || ( @@ -1450,7 +1450,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 0869361..7611b55 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1346,7 +1346,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system to fix this error." +call :dk_color %Blue% "Restart your system using restart button to fix this error." set showfix=1 ) ) @@ -1507,7 +1507,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu ) if defined _sppint ( echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" if not defined showfix call :dk_color %Blue% "%_fixmsg%" set showfix=1 ) || ( @@ -1593,7 +1593,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index f15a121..aae4899 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -742,9 +742,9 @@ call :dk_color %Red% "Failed to uninstall Ohook activation." call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." +call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." ) else ( -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) ) else ( call :dk_color %Green% "Successfully uninstalled Ohook activation." @@ -932,9 +932,9 @@ echo: call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then restart your system and try again." +call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." ) else ( -if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system and try again." +if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system using restart button and try again." if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." ) echo: @@ -1223,13 +1223,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) exit /b @@ -1655,7 +1655,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system to fix this error." +call :dk_color %Blue% "Restart your system using restart button to fix this error." set showfix=1 ) ) @@ -1816,7 +1816,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu ) if defined _sppint ( echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" if not defined showfix call :dk_color %Blue% "%_fixmsg%" set showfix=1 ) || ( @@ -1902,7 +1902,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" ) ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 68c988a..0424c78 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1324,13 +1324,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system and try again." +call :dk_color %Blue% "Restart your system using restart button and try again." ) exit /b @@ -2704,7 +2704,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system to fix this error." +call :dk_color %Blue% "Restart your system using restart button to fix this error." set showfix=1 ) ) @@ -2865,7 +2865,7 @@ reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ima%w%ge File Execu ) if defined _sppint ( echo %_sppint% | find /i "PerfOptions" %nul% && ( -call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System May Deactivate Later]" +call :dk_color %Red% "Checking SPP Interference In IFEO [%_sppint% - System might deactivate later]" if not defined showfix call :dk_color %Blue% "%_fixmsg%" set showfix=1 ) || ( @@ -2951,7 +2951,7 @@ for /f "delims=" %%a in ('%psc% "(Get-ScheduledTask -TaskName 'SvcRestartTask' - echo !taskinfo! | find /i "Ready" %nul% || ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "actionlist" /f %nul% reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask" %nul% || set taskinfo=Removed -call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System May Deactivate Later]" +call :dk_color %Red% "Checking SvcRestartTask Status [!taskinfo!, System might deactivate later]" ) ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 3f84673..6f496b3 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -700,7 +700,7 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time sc query TrustedInstaller | find /i "RUNNING" %nul% && ( %eline% echo Failed to stop the TrustedInstaller service. -echo Restart your system and try again. +echo Restart your system using restart button and try again. set preperror=1 exit /b ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index ae67278..7a27c66 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -547,7 +547,7 @@ echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( call :dk_color %Red% "[Failed]" -echo Restart your system, that will delete this registry key automatically. +echo Restart your system using restart button, that will delete this registry key automatically. ) || ( echo [Successful] ) -- cgit v1.2.3 From fd8b81411c14e08ba302f893fcc318a1318129fc Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 1 Sep 2024 02:50:49 +0530 Subject: Reword the restart line --- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 18 +++++++++--------- .../Activators/HWID_Activation.cmd | 2 +- .../Activators/KMS38_Activation.cmd | 2 +- .../Activators/Ohook_Activation_AIO.cmd | 14 +++++++------- .../Activators/Online_KMS_Activation.cmd | 6 +++--- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 0a0199c..6577247 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1438,7 +1438,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system using restart button to fix this error." +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." set showfix=1 ) ) @@ -2441,9 +2441,9 @@ call :dk_color %Red% "Failed to uninstall Ohook activation." call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." +call :dk_color %Blue% "If it is still not fixed, then Reboot your machine using the restart option and try again." ) else ( -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) ) else ( call :dk_color %Green% "Successfully uninstalled Ohook activation." @@ -2631,9 +2631,9 @@ echo: call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." +call :dk_color %Blue% "If it is still not fixed, then Reboot your machine using the restart option and try again." ) else ( -if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system using restart button and try again." +if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Reboot your machine using the restart option and try again." if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." ) echo: @@ -2922,13 +2922,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) exit /b @@ -7649,7 +7649,7 @@ echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( call :dk_color %Red% "[Failed]" -echo Restart your system using restart button, that will delete this registry key automatically. +echo Reboot your machine using the restart option, that will delete this registry key automatically. ) || ( echo [Successful] ) @@ -8871,7 +8871,7 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time sc query TrustedInstaller | find /i "RUNNING" %nul% && ( %eline% echo Failed to stop the TrustedInstaller service. -echo Restart your system using restart button and try again. +echo Reboot your machine using the restart option and try again. set preperror=1 exit /b ) diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 2899e72..87871c3 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1203,7 +1203,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system using restart button to fix this error." +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." set showfix=1 ) ) diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 7611b55..fb870f5 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1346,7 +1346,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system using restart button to fix this error." +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." set showfix=1 ) ) diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index aae4899..c31b5d7 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -742,9 +742,9 @@ call :dk_color %Red% "Failed to uninstall Ohook activation." call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." +call :dk_color %Blue% "If it is still not fixed, then Reboot your machine using the restart option and try again." ) else ( -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) ) else ( call :dk_color %Green% "Successfully uninstalled Ohook activation." @@ -932,9 +932,9 @@ echo: call :oh_checkapps if defined checknames ( call :dk_color %Blue% "Close [!checknames!] and try again." -call :dk_color %Blue% "If it is still not fixed, then Restart your system using restart button and try again." +call :dk_color %Blue% "If it is still not fixed, then Reboot your machine using the restart option and try again." ) else ( -if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Restart your system using restart button and try again." +if /i not "%ierror%"=="Copy" call :dk_color %Blue% "Reboot your machine using the restart option and try again." if /i "%ierror%"=="Copy" call :dk_color %Blue% "If you are using any third-party antivirus, check if it is blocking the script." ) echo: @@ -1223,13 +1223,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) exit /b @@ -1655,7 +1655,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system using restart button to fix this error." +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." set showfix=1 ) ) diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 0424c78..7e1f412 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1324,13 +1324,13 @@ reg query HKU\%%# %nul% && set failedtounload=1 if defined failedtoload ( set error=1 call :dk_color %Red% "Loading Unloaded Accounts Registry [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) if defined failedtounload ( set error=1 call :dk_color %Red% "Unloading Loaded Account Registries [Failed for some user accounts]" -call :dk_color %Blue% "Restart your system using restart button and try again." +call :dk_color %Blue% "Reboot your machine using the restart option and try again." ) exit /b @@ -2704,7 +2704,7 @@ if defined serv_e ( set error=1 call :dk_color %Red% "Starting Services [Failed] [%serv_e%]" echo %serv_e% | findstr /i "ClipSVC-1058 sppsvc-1058" %nul% && ( -call :dk_color %Blue% "Restart your system using restart button to fix this error." +call :dk_color %Blue% "Reboot your machine using the restart option to fix this error." set showfix=1 ) ) diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index 50b69f0..bf25353 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -700,7 +700,7 @@ for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time sc query TrustedInstaller | find /i "RUNNING" %nul% && ( %eline% echo Failed to stop the TrustedInstaller service. -echo Restart your system using restart button and try again. +echo Reboot your machine using the restart option and try again. set preperror=1 exit /b ) diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 7a27c66..a370876 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -547,7 +547,7 @@ echo Deleting a Volatile ^& Protected Registry Key... echo [%RegKey%] reg query "%RegKey%" %nul% && ( call :dk_color %Red% "[Failed]" -echo Restart your system using restart button, that will delete this registry key automatically. +echo Reboot your machine using the restart option, that will delete this registry key automatically. ) || ( echo [Successful] ) -- cgit v1.2.3 From ce669809bf05777230e71505e095a1bb7fc39eab Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sat, 7 Sep 2024 06:03:06 +0530 Subject: 2.7 --- .gitattributes | 7 ++++--- MAS/All-In-One-Version-KL/MAS_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/HWID_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd | 2 +- MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd | 2 +- MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd | 2 +- MAS/Separate-Files-Version/Change_Office_Edition.cmd | 2 +- MAS/Separate-Files-Version/Change_Windows_Edition.cmd | 2 +- MAS/Separate-Files-Version/Extract_OEM_Folder.cmd | 2 +- MAS/Separate-Files-Version/Troubleshoot.cmd | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd') diff --git a/.gitattributes b/.gitattributes index daf18c3..de5bd3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ -# MAS export-ignore -# LICENSE export-ignore -# README.md export-ignore +MAS export-ignore +LICENSE export-ignore +README.md export-ignore +.gitattributes export-ignore diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd index 28fb449..05a9402 100644 --- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd +++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd @@ -1,5 +1,5 @@ @::RANDOM-09dbb08f-d896-4653-b84f-24fc22f8d250 -@set masver=2.6 +@set masver=2.7 @setlocal DisableDelayedExpansion @echo off diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd index 87871c3..3cb7bc6 100644 --- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd index 73c5dba..962a146 100644 --- a/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/KMS38_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd index 8b6524c..ec2e8c9 100644 --- a/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd +++ b/MAS/Separate-Files-Version/Activators/Ohook_Activation_AIO.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd index 7e1f412..306bb47 100644 --- a/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd +++ b/MAS/Separate-Files-Version/Activators/Online_KMS_Activation.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Change_Office_Edition.cmd b/MAS/Separate-Files-Version/Change_Office_Edition.cmd index 48ffc32..c10cfdf 100644 --- a/MAS/Separate-Files-Version/Change_Office_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Office_Edition.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd index bf25353..f32d110 100644 --- a/MAS/Separate-Files-Version/Change_Windows_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Windows_Edition.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd index 2fb6381..53f68cd 100644 --- a/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd +++ b/MAS/Separate-Files-Version/Extract_OEM_Folder.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index a370876..46021c3 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -1,4 +1,4 @@ -@set masver=2.6 +@set masver=2.7 @echo off -- cgit v1.2.3