Sign in to follow this  
Followers 0
ro231270

Refresh Explorer.exe

5 posts in this topic

We are creating a little program to change the desktop of our users. We want to change the wallpaper and the style of the icons on the desktop (dropshadow of labels of the Icons). The settings must be effective immediately after running our program.

Changing and activating the wallpaper is not a problem. After adapting the registry, the settings will be put into effect by this command:

$rc = _RunDos(@SystemDir & "\RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True")

The style of the icons, however, will only be changed after a Log-Off and log-On to the system. Thus: a reload of the HKCU or just sending a "F5" is not enough.

The only way to disable the shadows of labels of the icons, without loging Off, is to kill Explorer.exe and restart it again. Disadvantage of this is that ALL open windows explorer windows will be closed, not only the explorer.exe used for displaying the desktop.

The key we have changed to affect the shadow in the icon labels is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow

(0-> no shadow, 1-> shadows).

Is it possible to refresh the desktop icons (restart Explorer.exe ??) , without closing all other open Explorer Windows?

Share this post


Link to post
Share on other sites



No, sending a "F5" or a relaod of the HKCU (USER32.DLL,UpdatePerUserSystemParameters ,1 ,True") is NOT enough.

maybe if you use this

ControlFocus("Program Manager", "", "")
Send("{F5}")

or

EnvUpdate()

Share this post


Link to post
Share on other sites

So have you actually tried EnvUpdate()?

Works fine here.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

No, sending a "F5" or a relaod of the HKCU (USER32.DLL,UpdatePerUserSystemParameters ,1 ,True") is NOT enough.

The only think left is to rebuild the toolbox calls but only pros can help you with this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0