2

I have a script that worked flawlessly in Windows 8.1. After I recently upgraded to Windows 10, the script still works but doesn't exactly 'save' the desktop wallpaper. The wallpaper will change after the script runs, but revert back to the older wallpaper when I log out, restart, or shut down.

Here's the snippet that does anything related to the system:

SPI_SETDESKWALLPAPER = 20 
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER,
                                           0,
                                           r"C:\Users\me\image.jpg",
                                           0)
simplycoding
  • 2,770
  • 9
  • 46
  • 91
  • Did you read the docs for [`SystemParametersInfo`](https://msdn.microsoft.com/en-us/library/ms724947)? It seems if you did, then you would at least say something like "I tried passing `SPIF_UPDATEINIFILE` in the `fWinIni` parameter, and ....". – Eryk Sun Aug 27 '15 at 17:13
  • If you are using Python 3 here is the [answer](http://stackoverflow.com/a/27726289/4333374) – Shawn S. Dec 18 '15 at 20:54

0 Answers0