4

As you can see, I followed the approach proposed by @meskr from How can I change my desktop background with python? to write my script in order to change my wallpaper.

ctypes.windll.user32.SystemParametersInfoW(20, 0, filepath, 0)

My system is Windows 10, and I use python 3.5. The code works fine, It can help me change my wallpaper correctly. But the wallpaper will reset to the default one when I reboot my system. I don't know why and how to avoid this.

Roger ALex
  • 95
  • 5

1 Answers1

-1

I resolved it setting an image from the setting panel of windows, this way windows will reload it from the disk at reboot, then the program will just override the same image with the other that you want to change and re-call

ctypes.windll.user32.SystemParametersInfoW(20, 0, filepath, 0)

this way windows will reload the latest image the program overrided.