Solved

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

Posted on 2011-09-12
3
1,652 Views
Last Modified: 2012-11-12
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?

0
Comment
Question by:CousinDupree
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 54

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 36526764
I think the only way to do this in Win7 is to stop and restart windows explorer. I've used a CMD script like the following for this:

@echo off
taskkill /f /im explorer.exe
del %LOCALAPPDATA%\IconCache.db /a
start explorer

Open in new window

~bp
0
 

Expert Comment

by:N0dlehs
ID: 36528303
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

0
 

Author Closing Comment

by:CousinDupree
ID: 36532518
.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question