电脑的时间同步电池坏掉了,每次开机都要调整时间

电脑的时间同步的电池没电了,每天开机时间都不对,要打开时间同步按钮来设置时间

解决方案

1.找到这个设置并打开,实际上,要打开这个界面,时间才会同步,可能是我的电脑原因,所以我没办法打开这个就结束了

2.写一个bat脚本,后缀为.bat就可以了

复制代码
@echo off
title Network Time Sync Tool
color 0A

echo =========================================
echo           Network Time Sync Tool
echo =========================================
echo.
echo This tool will help you sync network time through Windows settings
echo.
echo Preparing...
echo.

:: Check for administrator privileges
net session >nul 2>&1
if %errorLevel% equ 0 (
    echo Administrator privileges detected, attempting automatic time sync...
    echo.
    w32tm /resync /force
    
    if %errorLevel% equ 0 (
        echo =========================================
        echo Time synchronization successful!
        echo.
        echo Current system time: %date% %time%
        echo =========================================
        echo.
        echo Your system time has been successfully synced with network time.
        pause
        exit /b
    ) else (
        echo Automatic sync failed, will open time settings interface...
    )
)

echo =========================================
echo Please follow these steps to sync time manually:
echo 1. Select the "Sync" button in the popup window
echo 2. The window will close automatically after 3 seconds
echo =========================================
echo.

:: Open Windows time settings
start ms-settings:dateandtime

echo Time settings window has opened, please complete the synchronization.
echo Window will close automatically in 3 seconds...
echo.

:: Wait for 3 seconds
timeout /t 3 /nobreak >nul

:: Close the time settings window
taskkill /f /im SystemSettings.exe >nul 2>&1

3.把bat文件放到启动文件夹里面

看我的路径,找不到的就win+r,然后输入下面的指令

复制代码
shell:Common Startup
相关推荐
星空的资源小屋1 天前
MkFont,一款开源免费的字体设计工具
网络·人工智能·pdf·电脑
smart19982 天前
电脑备份、服务器备份、云备份、Veeam备份,选哪种存储设备?
网络·科技·电脑
xiaopengbc3 天前
新买的笔记本电脑为什么风扇声音一直很大?怎样解决?
电脑·1024程序员节
RoboWizard3 天前
电脑效能跃升利器 金士顿KVR内存焕新机
java·spring·智能手机·电脑·金士顿
星空的资源小屋3 天前
Tuesday JS,一款可视化小说编辑器
运维·网络·人工智能·编辑器·电脑·excel
西门吹雪@1323 天前
局域网手机/平板无数据线传输文件-通过网络传输LocalSend
网络·智能手机·电脑
星空的资源小屋3 天前
Antares SQL,一款跨平台开源 SQL 客户端
数据库·人工智能·pdf·开源·电脑·excel·1024程序员节
Ai173163915794 天前
英伟达RTX 6000 Ada 和L40S 对比,哪个更适合做深度学习?
图像处理·人工智能·gpt·深度学习·神经网络·机器学习·电脑
一勺-_-4 天前
怎么看电脑的主板BIOS型号
电脑
小+不通文墨5 天前
电脑外设用不了(可能是下了“病毒软件”)
电脑