www.fltk.net > 用VBS读取系统当前时间!

用VBS读取系统当前时间!

msgbox now

x=10CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

Dim WshShell Set WshShell = CreateObject("wscript.Shell") WshShell.Run "cmd.exe /c date 2018-03-19", 0 WshShell.Run "cmd.exe /c time 14:14:08", 0

x=10 CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

If NOT Date = "2015-3-28" Then wscript.quit…………如果日期不等于2015-3-28则退出。否则继续执行下面的代码。

today=Date()fake=Replace(today,Year(today),"2011")Set WshShell = WScript.CreateObject("Wscript.Shell")WshShell.Run "cmd /c echo "&fake&"|date"WshShell.Run "c:\xxx.exe"WScript.Sleep 20000WshShell.Run "cmd /c echo "&today&"|date"

一楼不要胡乱回复,那是VBS吗?坑爹呀!! 这是VBS代码: N = InputBox("请输入进程名称") Set wmi = GetObject("winmgmts:\\.\root\cimv2") Set ps = wmi.ExecQuery("select * from win32_process where name="&"'"&N&"'") For Each p In ps p....

利用vbs中的时间函数来计算 如果只需显示,则如下: @echo off >%tmp%\tmp.vbs echo wscript.echo DateAdd ("h",-8,Now()) cscript //nologo %tmp%\tmp.vbs&&del %tmp%\tmp.vbs pause 如果将时间设为变量,如下: @echo off >%tmp%\tmp.vbs echo...

x=10CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

网站地图

All rights reserved Powered by www.fltk.net

copyright ©right 2010-2021。
www.fltk.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com