Link to home
Start Free TrialLog in
Avatar of CousinDupree
CousinDupreeFlag for United States of America

asked on

How do I refresh the Desktop / Start Menu in Windows 7 by script or executable?

I need to force a reload of a Windows 7 Desktop and Start Menu through the use of a script or executable.  In Windows XP I did it with 3 lines of code in a vbscript


Dim objWshShell
Set objWshShell = CreateObject("WScript.Shell")
objWshShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters", 0, True


This doesn't work in Windows 7.  Does anyone have a solution?

ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
on the same lines as billprew, but you will have to restart the machine i think after the icon cache has been restarted...


@echo off
taskkill /IM explorer.exe /F
CD /d %userprofile%\AppData\Local
DEL IconCache.db /a
shutdown /r

Open in new window

Avatar of CousinDupree

ASKER

.