Thursday, 9 January 2014

SCCM Deployment - Background, Themes and BGInfo

SCCM Deployment - Background, Themes and BGInfo

Each corporation has a different policy when it comes to background personalisation.

Consider the following policies:

1. Set a default background and restrict any changes.
2. Set a default background and allow changes.
3. Set a default background, allow changes but apply some information over the background using BGInfo.

I'm going to address in this post the option 3.

I have seen a lot of information over the internet but none of them was very informative or would always work.

First you need to download BGInfo and copy the files to a folder from which you are going to create the SCCM Package. (Note that BGInfo is not required if you won't put any information over the background)

Now create the bgi file using the BGInfo that will be applied over the background.






Save it as Custom.bgi.

Create a batch file with the following:

C:\Windows\BGInfo.exe C:\Windows\Custom.bgi /timer:0 /NOLICPROMPT

Save it as BGInfo.cmd

Create a shortcut to point to C:\Windows\BGInfo.cmd and name it BGInfo.lnk

Also put in the folder where BGInfo is the custom background you want to use.

Now go to a Windows 7 machine and copy the Aero.theme file from C:\Windows\Resources\Themes to the same folder where you placed BGInfo.

Note: You can create your own theme file or copy one other theme file, but I'm going to use the Aero.theme because it has all the settings I want.

Now open the Aero.theme file using notepad, scroll down to [Control Panel\Desktop] and change Wallpaper=%SystemRoot%\web\wallpaper\Windows\MOHBackground.jpg to Wallpaper=%SystemRoot%\web\wallpaper\Windows\YourCustomBackground.jpg

Chage YourCustomBackground.jpg with the name of your background.

Also change the WallPaperStyle to 2 which corresponds to Stretch. The default is 10 which is Fill. I do that because when the BGInfo is applied it expands the wallpaper if it's set to Fill and the background gets out of position.



Other options are Fit = 6, Center = 0 and Tile = 1 but you also have to change the TileWallpaper to 1.

Now let's create a batch file to replace the theme during the build and copy the BGInfo files. Place it in the same folder where all the other files are.

TAKEOWN /F %SystemRoot%\Resources\Themes\Aero.theme
ICACLS %SystemRoot%\Resources\Themes\Aero.theme /reset
RENAME %SystemRoot%\Resources\Themes\Aero.theme Aero2.theme
COPY "%~dp0YourCustomBackground.jpg "%SystemRoot%\web\wallpaper\Windows" /Y
COPY "%~dp0Aero.theme" "%SystemRoot%\Resources\Themes" /Y
COPY "%~dp0BGInfo.exe" "%SystemRoot%" /Y
COPY "%~dp0Custom.bgi" "%SystemRoot%" /Y
COPY "%~dp0BGInfo.cmd" "%SystemRoot%" /Y
COPY "%~dp0BGInfo.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" /Y


Make sure you replace the CustomBackground.jpg with the name of your custom background. Save the batch file as SetTheme.bat

Now create the SCCM Package and specify the program with the following: SetTheme.bat

Place the package after Windows is installed. 

No comments:

Post a Comment