Need a script to change wallpaper to None
#1
Posted 31 January 2011 - 10:19 PM
#2
Posted 31 January 2011 - 11:47 PM
#3
Posted 01 February 2011 - 01:40 AM
CoffeeFiend, on 31 January 2011 - 11:47 PM, said:
You mean like this one? (I had it sitting around from when another person asked this question) Please let me know if there are any issues or if it helps out with your problem, OP.
#4
Posted 01 February 2011 - 02:47 AM
Glenn9999, on 01 February 2011 - 01:40 AM, said:
Kind of over-delivering
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "", SPIF_SENDWININICHANGE);
or even
push SPIF_SENDWININICHANGE ;2 push 0 ;(pointer to zero length string, but zero works too) push 0 push SPI_SETDESKWALLPAPER ;0x14 call SystemParametersInfoA
but this can accomplish this (albeit you have to pass cmd line args for that) and a bunch more (setting wallpaper with options, setting more registry entries)
Although this only solves part of the problem. Users can still set wallpapers by hand after that (even though not so convenient). Many small programs who cycle wallpapers will happily override this every few minutes, like webshots desktop, or Win7's desktop slideshow. A complete solution would check for Win 7 and disable desktop slideshow, likely change some settings using group policy, and you could even change the permissions on those registry keys... A "proper fix" would require some thought and some testing too.
#5
Posted 01 February 2011 - 03:21 AM
CoffeeFiend, on 01 February 2011 - 02:47 AM, said:
Actually it worked for the previous person, who wanted to set a specific bitmap upon login and have it show immediately. But why not support what you can when you do it, especially since the source for the program isn't that long? The same mechanics for that will work here if all the OP wants is the bitmap to be gone immediately. You suggested the program, I already had it on hand, so I posted it. That said...
Quote
It's hard to tell exactly what someone is looking to accomplish - it seems we are assuming what the OP wants by filling in the blanks on what is otherwise unsaid. Disabling the changing of the background wallpaper is another thing entirely, but as I understood it, the program previously generated will work here if the desire is to have the change reflected immediately. Otherwise, I'd just suggest the registry changes via script.
#6
Posted 01 February 2011 - 09:14 AM
CoffeeFiend, on 01 February 2011 - 02:47 AM, said:
Glenn9999, on 01 February 2011 - 01:40 AM, said:
Kind of over-delivering
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "", SPIF_SENDWININICHANGE);
or even
push SPIF_SENDWININICHANGE ;2 push 0 ;(pointer to zero length string, but zero works too) push 0 push SPI_SETDESKWALLPAPER ;0x14 call SystemParametersInfoA
but this can accomplish this (albeit you have to pass cmd line args for that) and a bunch more (setting wallpaper with options, setting more registry entries)
Although this only solves part of the problem. Users can still set wallpapers by hand after that (even though not so convenient). Many small programs who cycle wallpapers will happily override this every few minutes, like webshots desktop, or Win7's desktop slideshow. A complete solution would check for Win 7 and disable desktop slideshow, likely change some settings using group policy, and you could even change the permissions on those registry keys... A "proper fix" would require some thought and some testing too.
#7
Posted 01 February 2011 - 04:35 PM
clivebuckwheat, on 01 February 2011 - 09:14 AM, said:
As per the documentation and files included, it's a program. For what you indicate, you just put in your batch, cmd, or vbs (whatever works to run something) the following command line.
wpchange none 0
If you run that, it should eliminate the background bitmap
#8
Posted 01 February 2011 - 11:49 PM
#9
Posted 02 February 2011 - 04:57 PM
Glenn9999, on 01 February 2011 - 03:21 AM, said:
I didn't mean it was a bad thing that it had more features (that's usually a good thing), but merely that I had something simpler (trivial) in mind.
Glenn9999, on 01 February 2011 - 03:21 AM, said:
And this is where I more or less guess different (we are basically guessing indeed). Lots of work places don't allow wallpapers and want to enforce that. This removes the current wallpaper once run, but users can still set one up again using the usual ways, and many programs (windows' desktop slideshow, the popular webshots desktop, etc) will add one over and over again. So if it's like one of those workplaces (which may or may not be the case) then there is more to it, and it will require some thinking to come up with a proper solution instead of a band aid fix. It's hard to just guess the big picture accurately i.e. what he's trying to accomplish "overall" -- and I don't think the need is "just remove the wallpapers once and let people add one again later".
clivebuckwheat, on 01 February 2011 - 09:14 AM, said:
That was neither (C++ and assembly, which would need to be compiled first before they can be used). The end result would be the same as Glen9999's tool when used with "none 0". Again, this removes the current wallpaper when run, but you have to be aware of the "limitations".
#10
Posted 03 February 2011 - 12:24 AM
CoffeeFiend, on 02 February 2011 - 04:57 PM, said:
No offense taken.
CoffeeFiend, on 02 February 2011 - 04:57 PM, said:
So if it's like one of those workplaces (which may or may not be the case) then there is more to it, and it will require some thinking to come up with a proper solution instead of a band aid fix.
Definitely understood. The poster before this one that I referred to wanted to ensure a bitmap with the company logo showed up upon login of everyone and wanted to do it on the standard user login script. As I remember, the question of locking down the settings to change it came up then. As I recall, there are some group policy things that can be set to eliminate the user changing it, like through Desktop Settings. But the problem as was expressed with that was that other programs can effectively "get around" any of these restrictions, if present (basically anything with a "Set as Background" option, even MS Paint). Evidently, the API call is not checked for security settings, and the registry can't be locked down because there are usually legitimate programs that need access to it. No one really presented a good solution then where the desktop wallpaper stayed permanently in all cases.
(this was back when most companies had XP/2000 deployed and Vista was kind of new, so I don't know if you could actually lock down the desktop background tight on those)
This post has been edited by Glenn9999: 03 February 2011 - 12:25 AM
#11
Posted 03 February 2011 - 01:11 AM
Glenn9999, on 03 February 2011 - 12:24 AM, said:
That's ultimately what needs to be protected against writes (API calls and various apps *should* fail then). I don't see what would make it problematic but I haven't given that much thought, and there just may be some issues. Setting complex ACLs on registry entries can be kind of a pain though, and either ways it would require some testing on his end too (at a prior employer we used to have a "guinea pig" group precisely for this kind of stuff).
#12
Posted 12 February 2011 - 10:30 PM
Do you know if the wpchange is available in X64 version?
Regards
- ← Need to change resolution remotely is it possible?
- Unattended Windows 2000/XP/2003
- Creating an image with Dual Boot Winxp/winpe →



Help

Back to top









