The following snippet will change the background using a
Win32::API call to SystemParametersInfo but note that if the users are using Windows 2000 and ActiveDesktop, the ActiveDesktop background gets layered OVER the normal background so they won't see the change. I'll see if I can find a solution to change the ActiveDesktop background as well and post it here.
use warnings;
use Win32::API;
my $SystemParametersInfo = new Win32::API("user32","SystemParametersIn
+fo",[ I,I,P,I ],I);
if (not defined $SystemParametersInfo ) {
die "could not import SystemParametersInfo";
}
my $wallpaper = "c:\\winnt\\Blue Lace 16.bmp";
my $action = 20; #reference http://support.microsoft.com/support/kb/ar
+ticles/Q97/1/42.ASP to see which constant to use
my $saveWinINI = 0; #save this in the user profile?
my $param = 0; #dependent on what $action is
#change the wallpaper
my $retval = $SystemParametersInfo->Call($action,$param,$wallpaper,$sa
+veWinINI);
For more info on SystemParametersInfo look
here and
here.