Method #1: Create a .reg file.
.REG files are run in the logon script using regedit /s <reg file>
The format of the file is
Windows Registry Editor 5.0
<blank line>
<key name>
"<value name>"="<value>" a string value
"<value name>"=hex:<value> a binaryvalue
"<value name>"=dword:<value> a dword value
for your wallpaper example:
Windows Registry Editor 5.0
[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"Wallpaper"="
wall paper path and filename"
"TileWallpaper"="0"
Method #2: Use .inf files.
The second method is to user a Windows 95 style .inf file. These are run using the command
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 <inf file>
The format of the file is as follows
[Version]
Signature = "$Chicago$"
Provider=%Provider%
[Strings]
Provider="Your name"
[DefaultInstall]
AddReg = AddReg
DelReg = DelReg
UpdateInis = UpdateInis
[AddReg]
[DelReg]
[UpdateInis]
Below are the keys to be used
HKCR HKEY_CLASSES_ROOT
HKCU HKEY_CURRENT_USER
HKLM HKEY_LOCAL_MACHINE
HKU HKEY_USERS
The file below is an .inf file which performs the same as the .reg file described earlier
[Version]
Signature = "$Chicago$"
[DefaultInstall]
AddReg = AddReg
[AddReg]
HKU,".DEFAULT\Control Panel\Desktop","Wallpaper",0000000000,"
your full filename for wallpaper"
HKU,".DEFAULT\Control Panel\Desktop","TileWallpaper",0000000000,"1"
If we named this my_background.inf, then the logon script would have the line:
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 my_background.inf
Method #3: A pure Windows Scripting Host script.
This would be entered into a file my_background.vbs, and the logon script would have the line:
cscript my_background.vbs
Set WshShell = WScript.CreateObject("Wscript.Shell"

WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper",
"
your full path and filename of wallpaper here"
WshShell.Run _
"%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, False