Click on Pictures to View

To view a larger version of an image within a post, just click on the picture you want to view :)

Friday, September 11, 2015

Customize Windows 7 Profile for OS Deployment

Here is how I customized the Windows 7 profile for mass deployment using an SCCM 2012 Task Sequence.

After some research, I wrote a .cmd script to modify the parts of the user profile I wanted customized.

The script does the following:

1) Renames old Windows 7 default user account picture filename
  • Ren "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" user.bmp.bak

2) Copies the custom picture from the distribution point to the computer (sets the default account pic)
  • Copy "%~dp0user.bmp" "C:\ProgramData\Microsoft\User Account Pictures" /Y

3) Takes ownership of old Windows 7 default background filename as Administrators Group
  • Takeown /f C:\Windows\Web\Wallpaper\Windows\img0.jpg /A

4) Grant SYSTEM full control of the old default background filename
  • Echo Y | icacls "C:\Windows\Web\Wallpaper\Windows\img0.jpg" /grant "SYSTEM":F

5) Copies the custom picture from the distribution point to the computer (sets the default background)
  • Copy "%~dp0img0.jpg" "C:\Windows\Web\Wallpaper\Windows" /Y

6) Deletes the games folder from the startup menu for all users
  • Rd /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games"



I put all of those in a notepad text file with REMARK lines between them so I remember what each line does, then saved it as a .cmd file. (The below script also calls a second command script at the bottom)



I then copied all the relevant files that were needed (custom pictures, .cmd scripts, etc) to my distribution point(s).

After verifying that the script would run okay locally, I created a PACKAGE containing the .cmd file in SCCM 2012, and then added an "Install Package" line within my task sequence.

Package:

Task Sequence :


*Don't forget to tick the box that says "Allow this program to be installed from the Install Package task sequence without being deployed" option on the Advanced tab of the package program properties dialog box.

After running the task sequence, the computer had a new custom default profile picture for all local and domain users, a custom default background wallpaper for all local and domain users, and removed games folder from start menu.  The second script also sets the Control Panel view to "Classic" for all users, sets specific Windows icons on the desktop for all users, and sets the specified theme as well (actually, I removed the theme part from the second script because ours is managed via GPO so I don't know how well that part works with the changed background to custom image, or if it overwrites it, to be honest).

With this method of deploying the user profile picture and background, the end user can still opt to further customize their pictures themselves as well.





For further information on the second .cmd script, called in the script I wrote, see this article:

https://www.itsupportguides.com/windows-7/windows-7-default-profile-with-configmgr/


Sources:

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/1703c3f4-a2ea-4c4a-a73f-a93e6d51b2bb/windows-7-user-profile-creation-overwrites-custom-wallpaper

http://www.askvg.com/simple-trick-to-replace-default-built-in-flower-profile-picture-for-all-user-accounts-in-windows-7/

https://community.spiceworks.com/how_to/22362-how-to-set-a-default-user-logon-picture-windows-7

http://www.bonusbits.com/wiki/HowTo:Change_the_Default_Background_and_User_Image_on_Windows_7e



No comments:

Post a Comment

Give my post a +1 or let me know if you found any of my blog content helpful!