There are good reasons for setting the wallpaper in an organization. Picture yourself in a meeting about a mortgage, if you were to see an image of funny cats or dogs on the person’s computer, how would you react on that? Personally I wouldn’t care as long as what this person is telling me makes sense but that doesn’t necessary apply to everyone. This project was most about me reminding myself of c# than anything else but I have to admit that it has bothered me that I haven’t found a way to limit but still giving users a choice to express who they are and what’s appealing to them when it comes to personalization of their computer. (While still making sure that the desktop represent the organizations public image) So I made this. A way for an organization to limit the choice of wallpaper to a set of preapproved ones instead of forcing a single one.
Prerequisites:
· The “Desktop Wallpaper” GPO can’t be set to enable.
· The “Prevent changing desktop background” GPO should be set to enable.
Customizations:
You can change most of the text in the UI by editing the .exe.config file, this is also where you set the folder of the preapproved wallpapers. Thanks @josch62 for showing a young WPF-padawan that appsettings can be loaded from an external file. (TSBackground)
So what prevent the users from copying the files to a folder where they can edit them? Nothing really, but it wouldn’t matter because the exe still uses the config-file found in the value of "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SetBackground\ConfigPath" (Default %ProgramFiles (x86)%\SetBackground\SetBackground.exe.Config) There might be a way of bypassing that but I haven’t found one. If you have, please let me know and I’ll find another way of forcing the settings. Usage:
1. Modify the .exe.config to suit your needs.
2. Setbackground.exe /install Copies the files to %ProgramFiles(x86)%\SetBackground Creates HKEY_LOCAL_MACHINE\SOFTWARE\(WOW6432Node)\SetBackground 3. Setbackground.exe /uninstall Removes %ProgramFiles(x86)%\SetBackground Deletes HKEY_LOCAL_MACHINE\SOFTWARE\(WOW6432Node)\SetBackground
/install and /uninstall will prompt for credentials if elevation is needed and will display some info if started from a console. I would recommend using /uninstall with an exe that’s not in the installation folder since if not, that would require a reboot before the files are deleted.
There will be a warning symbol in the upper right corner if the user has write access to either the folder with the .exe.config file in it or the folder with the wallpapers.
Simply because that would allow the user to set any wallpaper and not just the preapproved ones which would be against the whole purpose of this app.
The warning can be disabled in the config file however.
The cropping and scaling of the preview function and to match that to what Windows is showing no matter the resolution or DPI was the time taking monster.
Choose the style from the dropdown list and double click any pic and the preview should be shown just as the wallpaper would be… I hope. https://github.com/MattiasC85/SetBackground
Comments