[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-09-12
3
Medium Priority
?
1,848 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 57

Accepted Solution

by:
Bill Prew earned 2000 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

656 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