Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Change windows background image from command line?
New Posts  All Forums:Forum Nav:

Change windows background image from command line?

post #1 of 3
Thread Starter 
Hey all, trying to figure out how from a .bat file to change the windows desktop image for the current user


This is what I had so far but the frustrating part is that it only works sometimes If I run it say 10 times it might only actually work once or twice (When it does work I go back in and set it to the way it was)



Copy wallpaper.bmp c:\

reg add “HKEY_CURRENT_USER\Control Panel\Desktop” /v Wallpaper /t REG_SZ /d C:\wallpaper.bmp /f


RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters



Basically I have this on a flash drive and it copies the bmp to the C: then sets it in the registry and then the last command is supposed to force a refresh and that's where it is getting stuck.

It successfully copies the file everytime and seems to set the regkey correctly but when it comes to the actually refresh it doesn't seem to and the desktop will still display the current image unless I run it several times


any ideas?
Server/Gaming Rig
(22 items)
 
  
CPUCPUMotherboardGraphics
Intel E5-2670 intel E5-2670 Asus Z9PE-D8 WS Visiontek R9 390 
RAMHard DriveHard DriveHard Drive
8x4GB DDR3 1333 ECC Registered Toshiba 5TB X300 Seagate 4TB HGST 4TB 
Hard DriveHard DriveHard DriveHard Drive
Sandisk 240GB Sandisk 480GB Samsung 830 128GB Toshiba 6TB X300 
Hard DriveHard DriveOptical DriveOS
Toshiba 5TB X300 Toshiba 5TB X300 WH16NS40 Windows 10 Pro 
MonitorMonitorKeyboardPower
Dell S1715H Dell u2311h blackwidow ultimate Kingwin Lazer platinum 1000w 
CaseMouse
Corsair 800D Deathadder Chroma 
  hide details  
Reply
Server/Gaming Rig
(22 items)
 
  
CPUCPUMotherboardGraphics
Intel E5-2670 intel E5-2670 Asus Z9PE-D8 WS Visiontek R9 390 
RAMHard DriveHard DriveHard Drive
8x4GB DDR3 1333 ECC Registered Toshiba 5TB X300 Seagate 4TB HGST 4TB 
Hard DriveHard DriveHard DriveHard Drive
Sandisk 240GB Sandisk 480GB Samsung 830 128GB Toshiba 6TB X300 
Hard DriveHard DriveOptical DriveOS
Toshiba 5TB X300 Toshiba 5TB X300 WH16NS40 Windows 10 Pro 
MonitorMonitorKeyboardPower
Dell S1715H Dell u2311h blackwidow ultimate Kingwin Lazer platinum 1000w 
CaseMouse
Corsair 800D Deathadder Chroma 
  hide details  
Reply
post #2 of 3
http://www.overclock.net/t/1367783/using-bat-files-to-change-the-desktop-wallpaper-in-windows-7
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
post #3 of 3
Thread Starter 
thank you
Server/Gaming Rig
(22 items)
 
  
CPUCPUMotherboardGraphics
Intel E5-2670 intel E5-2670 Asus Z9PE-D8 WS Visiontek R9 390 
RAMHard DriveHard DriveHard Drive
8x4GB DDR3 1333 ECC Registered Toshiba 5TB X300 Seagate 4TB HGST 4TB 
Hard DriveHard DriveHard DriveHard Drive
Sandisk 240GB Sandisk 480GB Samsung 830 128GB Toshiba 6TB X300 
Hard DriveHard DriveOptical DriveOS
Toshiba 5TB X300 Toshiba 5TB X300 WH16NS40 Windows 10 Pro 
MonitorMonitorKeyboardPower
Dell S1715H Dell u2311h blackwidow ultimate Kingwin Lazer platinum 1000w 
CaseMouse
Corsair 800D Deathadder Chroma 
  hide details  
Reply
Server/Gaming Rig
(22 items)
 
  
CPUCPUMotherboardGraphics
Intel E5-2670 intel E5-2670 Asus Z9PE-D8 WS Visiontek R9 390 
RAMHard DriveHard DriveHard Drive
8x4GB DDR3 1333 ECC Registered Toshiba 5TB X300 Seagate 4TB HGST 4TB 
Hard DriveHard DriveHard DriveHard Drive
Sandisk 240GB Sandisk 480GB Samsung 830 128GB Toshiba 6TB X300 
Hard DriveHard DriveOptical DriveOS
Toshiba 5TB X300 Toshiba 5TB X300 WH16NS40 Windows 10 Pro 
MonitorMonitorKeyboardPower
Dell S1715H Dell u2311h blackwidow ultimate Kingwin Lazer platinum 1000w 
CaseMouse
Corsair 800D Deathadder Chroma 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Change windows background image from command line?