Dim ws,fso,nowpath,filename Set ws=Wscript.createobject("wscript.shell") Set fso = CreateObject("Scripting.FileSystemObject") nowpath = fso.GetFolder(".").Path filename= "reg.bat" stryun = "schtasks /create /sc DAILY /mo 1 /sd ""2019/08/01"" /st ""02:00:00"" /tn ""每天2点杀死office转化进程"" /ru System /tr """&nowpath&"\killword.bat""" Set myfile=fso.CreateTextFile(filename,true) myfile.WriteLine(""&stryun&""&vbcrlf&"regsvr32 "&nowpath&"\mswinsck.ocx"&vbcrlf&"del "&nowpath&"\"&filename&"") myfile.Close Set ws = Nothing Set fso = Nothing MsgBox "已创建【"&filename&"】文件,请用右键→已管理员身份运行",0,"提示"