Hi Steven,

You are half-way there. Windows actually provides an API for making desktop environment changes like backgrounds. You can change the configuration setting you need and inform Windows that you have changed it via the SystemParametersInfo() API call.


Here's a snippet of code for you:



use Win32::API;


# SystemParameterInfo( SPIF_SETDESKWALLPAPER, NULL,
#                      filename, SPIF_SENDCHANGE )
my $fcnSPIa = new Win32::API( "user32",
                              "SystemParametersInfo",
                              ['N', 'N', 'P', 'N'], 'N' );


my $wallpaper_path = "C:\\winnt\\paper.bmp";


my $result = $fcnSPIa->Call( 20, 0, $wallpaper_path, 2 );

# eof


Cheers, Mark




Steven Satelle (Service Desk) wrote:
Does anyone know how to do this?
I tried modifying the background image through the registry, but it doesn't
take affect unless I log out and back in. What I want is simple (I hope!). I
have a bunch of pc's that use autologon to log in a generic account. The
password will be changed once a month which means the account has to log out
and I want to both send a popup message to the client and change the
background the day before to make sure nobodies using the pc at the time.
All this will happen automagically, because I'm not going to do this by hand
once a month. So obviously a perl script to do it comes to mind. The screen
popup, passwd change and reboot I can do easy enough (I think). But the
background change I cant do and extensive googling finds nothing. Although I
found a lot of info on the history of perl. Try searching for "perl win32
background" and see what you get :-)


Thnks Steven AerRiantaIT Service Desk [EMAIL PROTECTED]


_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to