Vbscript 运行脚本的脚本

Vbscript 运行脚本的脚本,vbscript,wmi,wsh,Vbscript,Wmi,Wsh,我在vbscript上有一个脚本 Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath Set WSHShell = CreateObject("WScript.Shell") Dim objFSO, objFileCopy Dim strFilePath, strDestination Const OverwriteExisting = True Set objFSO = CreateObje

我在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运行
  • 修改shutdown.vbs脚本以检查时间-如果时间介于9:30和12:00之间,请关机
  • 安排两个任务来执行关机脚本:一个在9:30运行,另一个在系统启动时运行
    请查找代码格式,或单击问号寻求帮助。交叉张贴在此处:,和。我不理解您的问题“如何使shutdown.vbs不在9:30运行一次,而是在9:30到12:00运行一次”。您能详细说明一下吗?马克