GPO to change default Account User Picture and Default Welcome Screen not working

jgould763
jgould763 used Ask the Experts™
on
I'm attempting to create a .bat file that will run as a script from a Windows Server 2008 GPO to Windows 7 computers that will change the default User Account Picture with one from a shared domain server location that has a more corporate theme. First In Group Policy, I enabled the Computer Configuration\Preferences\Control Panel\User Accounts - "Apply the default user logon picture to all users."

I tried a couple of ways to chage the default user.bmp file located at: "%programdata%\Microsoft\User Account Pictures\User.bmp." I tried Computer Configuration\Preferences\Windows Settings\Files\ and replacing the file with one from a shared domain server location without any success.

Second I tried to run a .bat  script, (see script below) but while testing it in the command line, I get the following error: "The system cannot find the path specified. Path not found - C:\ProgramData\Microsoft\User Account Pictures\User.bmp" I suspect it has something to do with permissions, and/or that %programdata% is a hidden folder.

Also, I'm trying to change the default background when users log in. We use BGInfo and I'm trying to change the default login screen to this. I've determined that the file is located at: "%WinDir%\System32\Oobe\background.bmp, but when I try to change it with the script listed below, I get this error: "C:\Windows\System32\Oobe\background.bmp Access is denied. A duplicate file name exists, or the file cannot be found."

I'll admit I'm not any good at this scripting stuff. Maybe there is a better way to do what I'm trying to accomplish. I did find a .vbs file on this site for changing the default User Acount Picture, but I couldn't get it to work. When I run the script in the command line, I get this error: "Input Error: There is no script engine for file extension ".vbs""

Any help would be greatly appreciated.




@echo off
cls

replace \\<SERVER>\BGInfo$\user-image\User.bmp "%programdata%\Microsoft\User Account Pictures\User.bmp" /u

copy %UserProfile%\AppData\Local\Temp\BGInfo.bmp %WinDir%\System32\Oobe /Y
del %WinDir%\System32\Oobe\background.bmp /f /q
rename %WinDir%\System32\Oobe\BGInfo.bmp background.bmp

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Use "replace \\<SERVER>\BGInfo$\user-image\User.bmp "%programdata%\Microsoft\User Account Pictures" /u"
Replace command doesn't require filename in the second parameter.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial