但可能变通方法做到,本人最近写了一个vbs改时间的脚本,不用第三方组件仅一个vbs就能实现,有需要的私信我。
set wshshell = CreateObject("WScript.Shell")set fs = CreateObject("Scripting.FileSystemObject")
str=InputBox("请输入你要更改的日期!格式为""&vbCr&"Year-MM-DDHH:MM:SS.SS")
if str="" or str=vbCancel then WScript.Quit
str=split(str,"")
if str(0)<>vbCancel then
answerfile="C:\temp.txt"
set answers=fs.CreateTextFile(answerfile,true)
answers.WriteLine str(0)
answers.close
command="%COMSPEC% /c date <"&answerfile
result=wshshell.Run(command,0,true)
end if
if UBound(str)=1 then
if str(1)<>vbCancel then
set answers=fs.CreateTextFile(answerfile,true)
answers.WriteLine str(1)
answers.close
command="%COMSPEC% /c time <"&answerfile
result=wshshell.Run(command,0,true)
end if
end if
command="%COMSPEC% /c del c:\temp.txt"
result=wshshell.Run(command,0,true)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)