Advertisement
VADemon

AutoIT: Windows Update Wallpaper System Call

Jan 9th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.84 KB | None | 0 0
  1. ;$filePath = "C:\Users\USERNAME\AppData\Roaming\Microsoft\Internet Explorer\rainbow_dash.bmp"
  2. $filePath = EnvGet("UserProfile") & "\Desktop\lossless_wallpaper.bmp"
  3.  
  4. ; This works just fine. Idk, wanted to try something different
  5. ; Derived from _ChangeWallpaper function by TheOnlyOne http://www.autoitscript.com/forum/user/41709-theonlyone
  6. ;DllCall("User32.dll","int","SystemParametersInfo","int",20,"int",0,"str", $filePath ,"int",0)
  7.  
  8. ; this one is from: https://social.msdn.microsoft.com/Forums/windows/en-US/234e2c53-3233-46e9-b81a-856fb6cb1d61/getset-desktop-wallpaper-in-windows-7?forum=winforms
  9. local $SPI_SETDESKWALLPAPER = 0x14
  10. local $SPIF_UPDATEINIFILE = 0x01
  11. local $SPIF_SENDWININICHANGE = 0x2
  12. DllCall("User32.dll","int","SystemParametersInfo","int",0x14, "int", 0x3, "str", $filePath, "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement