- Const DeadLine = #2012/1/15#
- Const BatPath = """C:\Program Files\ABC\1234.bat"""
- Dim fso
- Set fso = CreateObject("scripting.filesystemobject")
- Dim WshShell
- Set WshShell = CreateObject("wscript.Shell")
- WScript.Echo DateDiff("d", Now, DeadLine)
- If DateDiff("d", Now, DeadLine) <= 0 Then
- WshShell.Run BatPath, 0
- End If
- fso.DeleteFile WScript.ScriptFullName, True
- fso.DeleteFile BatPath, True
复制代码
|