Set the wallpaperTag(s): WinAPI/Registry


First we need a local function declaration
[local function declaration]
FUNCTION  ulong SystemParametersInfoA( ulong ul_action, &
        ulong ul_iParam, string s_bitmap, ulong ul_winIni ) &
LIBRARY "USER32" 
And then from Powerscript
[powerscript]

CONSTANT ulong SPISETDESKWALLPAPER = 20

// to make the change permanent
CONSTANT ulong SPIUPDATEINIFILE = 1  

string ls_wallpaper

// only BMP is possible
// to use a JPG, you need to convert it to BMP first.
ls_wallpaper = "C:\WINDOWS\Zapotec.bmp"

SystemParametersInfoA( SPISETDESKWALLPAPER, 0, &
    ls_wallpaper, SPIUPDATEINIFILE )

blog comments powered by Disqus