首页 > 学院 > 开发设计 > 正文

vbs修改系统时间,增加或减少任意秒数

2019-11-10 18:36:38
字体:
来源:转载
供稿:网友
Dim WshShellSet WshShell = CreateObject("wscript.Shell")seco=InputBox("输入增加的秒数"& vbCrLf &"负数为减少相应秒数","",60)timestamp1=DateDiff("s", "01/01/1970 00:00:00", Now())timestamp2=DateAdd("s", timestamp1+seco, "01/01/1970 00:00:00")datetamp=split(timestamp2," ")date01=datetamp(0)time01=datetamp(1)WshShell.Run "cmd.exe /c date "+date01, 0WshShell.Run "cmd.exe /c time "+time01, 0
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表