Sign in to follow this  
Followers 0
WhiteAvenger

Windows XP - Set/get desktop background

6 posts in this topic

Hi,

is it possible, on a WinXP machine, to get and set the desktop background?

Would I have to go through the control panel there or is there already a simple function or include script that I could use?

Thanks,

--WhiteAvenger

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

is it possible, on a WinXP machine, to get and set the desktop background?

Would I have to go through the control panel there or is there already a simple function or include script that I could use?

Thanks,

--WhiteAvenger

It's just a registry setting in HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper, you might also want WallPaperStyle = 2 for stretch full screen.

See RegWrite()

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Setting the wallpaper through registry is not the best since you must restart for something to happen. Better to use dll, see flyingboz _ChangeDestopWallpaper() http://www.autoitscript.com/forum/index.php?showtopic=16628

Share this post


Link to post
Share on other sites

Setting the wallpaper through registry is not the best since you must restart for something to happen. Better to use dll, see flyingboz _ChangeDestopWallpaper() http://www.autoitscript.com/forum/index.php?showtopic=16628

Thanks, I think this does what I wanted. However, it doesn't have a Get() version, so I can't find out what the current Desktop Wallpaper is. Is there a similar function or a workaround for that?

Share this post


Link to post
Share on other sites

Use RegRead() on the key PsaltyDS talked about in post2

Yup, realised that as well. Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0