当前位置: 首页 > news >正文

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

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

解决方案

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

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

@echo off
title Network Time Sync Tool
color 0Aecho =========================================
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 /forceif %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.pauseexit /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:dateandtimeecho 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

http://www.dtcms.com/a/310345.html

相关文章:

  • 【RocketMQ】鉴权机制
  • 网络协议之路由是怎么回事?
  • 电商项目_性能优化_数据同步
  • 18.若依框架中的xss过滤器
  • Java 24 新特性解析与代码示例
  • 牛客——取数游戏2
  • UE5 动态扫描波
  • 【C#学习Day15笔记】拆箱装箱、 Equals与== 、文件读取IO
  • iPhone查看App日志和系统崩溃日志的完整实用指南
  • 深入理解C语言指针:从回调函数到数组指针笔试题全解析(下)
  • 遥控器信号捕获
  • [CISCN 2022 初赛]online_crt
  • 基于react的YAPI实战指南
  • JavaWeb--Student2025项目:增删改查
  • 光纤网络FTTx(光接入网的应用类型)
  • 标准项目-----网页五子棋(4)-----游戏大厅+匹配+房间代码
  • Qt Quick 性能优化方法
  • WPF TreeView自带自定义滚动条
  • 云计算k8s集群部署配置问题总结
  • 铁皮矫平机冷知识·第三弹
  • 网站QPS多少才算高并发
  • A∗算法(A-star algorithm)一种在路径规划和图搜索中广泛使用的启发式搜索算法
  • 利用CompletableFuture优化查询效率
  • 1.2.4 砌体结构设计构造要求
  • Dify知识库分段策略详解:通用分段 vs 父子分段
  • 开源框架推荐:API数据批处理与爬虫集成
  • 前端开发一百问(动态更新)
  • 【0基础PS】PS工具详解--仿制图章工具
  • RustFS:高性能文件存储与部署解决方案(MinIO替代方案)
  • MySQL锁的分类 MVCC和S/X锁的互补关系