jeamrotae
asked on
How can I create a registry file for xp to change desktop backgrounds to a batch file or vbs script?
Recently I have been able to push a batch script to change the desktop background in GPO policies for each workstation through the server
This is the batch file: copy \\server\sharename.jpg C:
Also, I put the same UNC above in the GPO: Administrative Template, Desktop, Active Desktop, Active Desktop Wallpaper and Enabled Active Desktop.
This works fine, all workstations/ users get whatever desktop I want them to get but, the desktop icons do not use drop shadow. Therefore the icons do not blend with the desktop. Locally on a workstation I could right click on My Computer , Advanced, if it were not if my restrictions on each workstation/user I would be able to Performance Settings, Visual Effects, Custom, Selec/Check use drop shadows for icon labels on the desktop. Usually that does the trick but when I modify GPOs I longer can choose this option or it does not work.
This is the batch file: copy \\server\sharename.jpg C:
Also, I put the same UNC above in the GPO: Administrative Template, Desktop, Active Desktop, Active Desktop Wallpaper and Enabled Active Desktop.
This works fine, all workstations/ users get whatever desktop I want them to get but, the desktop icons do not use drop shadow. Therefore the icons do not blend with the desktop. Locally on a workstation I could right click on My Computer , Advanced, if it were not if my restrictions on each workstation/user I would be able to Performance Settings, Visual Effects, Custom, Selec/Check use drop shadows for icon labels on the desktop. Usually that does the trick but when I modify GPOs I longer can choose this option or it does not work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> maybe change the picture file name and extension to bmp like you said
Open with MSPaint and save as .bmp. Changing the name won't change the format and even though it stop picture viewers opening it normally.
> strWallpaperDestination = objShell.ExpandEnvironment
Just expands the User Profile environmental variable as a safe place to copy the wallpaper to without requiring admin rights. You can see the contents by typing this into the command line:
echo %UserProfile%
> Set objRegistry = GetObject("winmgmts:\\.\ro
Simply a connection to the registry on the local machine (dot is the local machine). It's how the script sets the wallpaper.
> My problem is the background icon desktop shadow does not work when I use the
> batch file eventhough it works well otherwise
I'll take another look at that setting at home.
Chris
ASKER
ok Chis Dent
please get back to me because the use shadow icon does not work
please get back to me because the use shadow icon does not work
ASKER
I just added this to your script. I don't see anything else to modify.
' Network and local locations for the wallpaper file
Const WALLPAPER_SOURCE = "\\server1\pic\ NYC.bmp"
Chris Dent:
Do these lines apply to what I am doing
' Get the current user profile so we can copy the wallpaper there.
Set objShell = CreateObject("WScript.Shel
strWallpaperDestination = objShell.ExpandEnvironment
And
' Connect to the Registry on the local machine
Set objRegistry = GetObject("winmgmts:\\.\ro
What I want to do with this script is put it in my logon script in Group Policy (maybe change the picture file name and extension to bmp like you said), \\server\sharedfolder\pic.
I just trying if I apply to xp registry the background and icon would show correctly.