Jump to content
Sign in to follow this  
sshrum

Refresh Windows with new desktop setting w/ AutoIT

Recommended Posts

envupdate (upon closer inspection) seems to only update the environment variables (things like 'SET foo = bar' and stuff) if I'm reading the help file right.

As for "DLLCall + SystemParametersInfo + SPI_SetDesktopWallpaper"...

Please impart upon us, o sage one, the magic incantation that is: "DLLCall + SystemParametersInfo + SPI_SetDesktopWallpaper"

:)


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

Is it not possible to specify a non-BMP image as the wallpaper? :D

I know this is kind of old, but if anyone wants this...

FileInstall ("path to your file" & "\yourfile.jpg", "C:\WINDOWS\yourfile.jpg", 1)
RegWrite("HKCU\Control Panel\Desktop", "ConvertedWallpaper", "reg_sz", "C:\WINDOWS\yourfile.jpg")
Sleep (1000)
RegWrite("HKCU\Control Panel\Desktop", "Wallpaper", "reg_sz", RegRead ("HKEY_CURRENT_USER\Control Panel\Desktop", "ConvertedWallpaper"))
RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0")
RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2")
ControlSend ("Program Manager", "", "", "{F5}")
FileDelete (@WindowsDir & "\yourfile.jpg")

I used FileInstall because that way you can compile the script and run it on any computer to change the background.


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...