reginit.vbs 633 B

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