I am trying to execute Python code like clockwork to refresh a Windows 7 desktop background. It runs consummately when begun from the command-line, however not as a planned undertaking.
Code:
import ctypes
# According to MSDN/other websites
SPI_SETDESKWALLPAPER = 20
# Update wallpaper
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, pathToWallpaper, 0)
The scheduled task runs, and my transitory .bmp (at pathToWallpaper) is made, yet the work area doesn't refresh.
Is there anything I'm missing? If yes, please let me know.