from setuphelpers import *
import ctypes
uninstallkey = []
SPI_SETDESKWALLPAPER = 20
SPIF_SENDCHANGE = 2
SPIF_UPDATEINIFILE = 1
regpath = r'Control Panel\Desktop'
my_wallpaper = r'C:\Windows\Web\Wallpaper\
my_wallpaper
.jpg'
def install():
filecopyto('
my
_wallpaper.jpg',
my
_wallpaper)
def uninstall():
remove_file(
my
_wallpaper)
def session_setup():
registry_setstring(HKEY_CURRENT_USER, regpath, 'WallpaperStyle', '0')
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0,
my
_wallpaper, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)
ctypes.windll.user32.UpdatePerUserSystemParameters(1)
A la première connexion de chaque utilisateur, le fond d'écran lui
sera appliqué, et configuré pour être centré.