起始代码

On Error Resume Next

关闭进程

Sub Close_Process(ProcessName)
Dim objShell
Set objShell = wscript.CreateObject("wscript.Shell")
objShell.Run "ntsd -c q -pn " & ProcessName, 0, True
End Sub
Close_Process "raserver.exe"

删除文件(删除自身-修改程序名问自身即可)

Dim fso
set fso=createobject("scripting.filesystemobject")
fso.deleteFile "程序名.exe"

重命名

Dim fso
set fso=createobject("scripting.filesystemobject")
fso.movefile "程序名.up","程序名.exe"

执行程序

set no1=createobject("Wscript.Shell")
no1.run ("程序名.exe")

延时(毫秒)

wscript.sleep(1000) 

Related Posts: VBS-关闭进程,删除文件,重命名,执行程序,延时,删除自身 :