运行脚本的脚本
我在 vbscript 上有一个脚本
Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath
Set WSHShell = CreateObject("WScript.Shell")
Dim objFSO, objFileCopy
Dim strFilePath, strDestination
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set windir = objFSO.getspecialfolder(0)
objFSO.CopyFile "\\dv.rt.ru\SYSVOL\DV.RT.RU\scripts\shutdown.vbs", windir&"\", OverwriteExisting
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
JobID = "1"
Set colScheduledJobs = objWMIService.ExecQuery _
("Select * from Win32_ScheduledJob")
For Each objJob in colScheduledJobs
objJob.Delete
Next
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreate = objNewJob.Create _
(windir & "\shutdown.vbs", "********093000.000000+660", _
True, 1 OR 2 OR 4 OR 8 OR 16 OR 32 OR 64, ,True, JobId)
如何使 shutdown.vbs 不在 9:30 运行一次,而是在 9:30 到 12:00 运行
I have a script on vbscript
Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath
Set WSHShell = CreateObject("WScript.Shell")
Dim objFSO, objFileCopy
Dim strFilePath, strDestination
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set windir = objFSO.getspecialfolder(0)
objFSO.CopyFile "\\dv.rt.ru\SYSVOL\DV.RT.RU\scripts\shutdown.vbs", windir&"\", OverwriteExisting
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
JobID = "1"
Set colScheduledJobs = objWMIService.ExecQuery _
("Select * from Win32_ScheduledJob")
For Each objJob in colScheduledJobs
objJob.Delete
Next
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreate = objNewJob.Create _
(windir & "\shutdown.vbs", "********093000.000000+660", _
True, 1 OR 2 OR 4 OR 8 OR 16 OR 32 OR 64, ,True, JobId)
How make that shutdown.vbs not run once at 9:30 but run for 9:30 to 12:00
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)