Created
May 27, 2023 14:54
-
-
Save InvisibleRain/1acd50570863a5c69bdc2251aa9fb753 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
goto check_Permissions | |
:check_Permissions | |
echo Administrative permissions required. Detecting permissions... | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo Success: Administrative permissions confirmed. | |
) else ( | |
echo Failure: Current permissions inadequate. Run as administrator. | |
pause >nul | |
) | |
w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org | |
w32tm /resync | |
exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment