Skip to content

Instantly share code, notes, and snippets.

@Gavriel770U
Gavriel770U / settime.bat
Last active March 14, 2024 17:14
`.bat` file that synchronizes your timezone with your computers time. Often used because of the time error of switching from OS to OS.
@echo off
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.