0

I'm doing an internship project for a local community college. We are running Windows 7 virtual machines and have created pools for the different rooms. When a computer is logged onto in one of these rooms the vbscript will look at the pool and decide which desktop wallpaper to assign to that virtual machine.

I am curious on how to get the desktop wallpaper to refresh without having to log off.

I tried using SendKeys to "f5" the desktop but that doesn't seem to work. Also, when I taskkill explorer.exe, it doesn't restart.

Any suggestions?

JCoble
  • 1
  • 1
  • try running "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters" after you change the wallpaper in the registry. – Syberdoor Sep 18 '15 at 05:40
  • @Syberdoor I've tried that. It worked in WIndows XP, but for some reason doesn't work with WIndows 7. – JCoble Sep 19 '15 at 02:15
  • Interesting. We used that method for our Windows 7 machines. Is powershell an option? There you could call native Win API functions directly, so maybe that would work in your case – Syberdoor Sep 21 '15 at 05:41
  • @Syberdoor I was using .jpg instead of .bmp and apparently you can only change .bmp wallpapers on the fly in windows 7. – JCoble Sep 23 '15 at 19:54

0 Answers0