Snurf08

Untitled

Sep 1st, 2022
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Set objEnv = objShell.Environment("User")
  2.  
  3. strDirectory = objShell.ExpandEnvironmentStrings("%temp%")
  4.  
  5. dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
  6. dim bStrm: Set bStrm = createobject("Adodb.Stream")
  7. xHttp.Open "GET", "https://tse1.explicit.bing.net/th?id=OIP.oqKZ9IsOGxOWvX-hf6pwYQHaHa&pid&Api", False
  8. xHttp.Send
  9.  
  10. with bStrm
  11. .type = 1 '//binary
  12. .open
  13. .write xHttp.responseBody
  14. .savetofile strDirectory + "\myImage.png", 2 '//overwrite
  15. end with
  16.  
  17. objShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", strDirectory + "\myImage.png"
  18. objShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True
Advertisement
Add Comment
Please, Sign In to add comment