Jump to content

Refresh Windows with new desktop setting w/ AutoIT


sshrum
 Share

Recommended Posts

have you tried using the EnvUpdate ( ) autoit function? From the description it sound like it could work....

<{POST_SNAPBACK}>

Hmmm. Completely missed this. I'll give it a try and let you know later if it works.

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'

 

Link to comment
Share on other sites

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'

 

Link to comment
Share on other sites

  • 3 years later...
  • 3 months later...

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...