diff options
Diffstat (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd')
| -rw-r--r-- | MAS/Separate-Files-Version/Troubleshoot.cmd | 119 |
1 files changed, 60 insertions, 59 deletions
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%..."
|
