Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how can you make desktop refresh automatically?

Featured Replies

there are some changes after RunOnceEx happens that can only be seen if the desktop refreshes(the registry option for showing file extensions.)

does anyone know a quick VBS script that could refresh the desktop? ive been learning some VBS, i can do appactivate and some basic stuff, but i can't find a resource that tells how to 'activate' the desktop and then from there i could perform a sendkey f5.

Well i don't know vbs but i know that desktop is a "device context" from the explorer.exe service so u can go to task manager and "end task" the explorer -- it will close the GUI and restart it (maybe that should work) -- if not a restart always does it.

U can restart even during GUIRunOnce and u can kill almost any service using taskkill app in windows or get pskill from sysinternals.com.

U might want to get a good habit of testing first then applying :)

Edited by wolfshade

  • Author

ahh yes. pskilling explorer.exe and then bringing it back did just the trick. thanks

  • Author

argh, for some reason after i run this:

pskill explorer.exe

start exporer.exe

my documents window pops in explore mode. i have no clue why. i didn't tell it to. and if i do the above using the gui the my documents window doesnt pop up. any ideas? im trying to make this as clean as possible so that window isn't acceptable

yes but u lose your settings

some tweak programs (xptweak I think) manages to restart the shell I still couldn't find how it does that.

but there are other ways..

ok the reason for my documents poping up is :

u have 2 explorer.exe's running(obviously at sepeare memories)

after u close one explorer.exe and re open it it will give u the my documents folder

in order to get back the full explorer u need to close both..

  • Author

what settings do i lose by doing it this way? i didn't notice anything awry.

you can send a settingschanged broadcast (thru an API)

this will refresh the settings, I posted it a while ago in a thread about QuickLaunch on this forum.

gr /\/\o\/\/

found it :

the WM_SETTINGCHANGE message is used to to refresh the windowssettings,

(as set in the registry e.g. system variables)

Declare Auto Function SendMessageTimeout Lib "User32" ( _

ByVal hWnd As Integer, _

ByVal Msg As UInt32, _

ByVal wParam As Integer, _

ByVal lParam As Integer, _

ByVal fuFlags As UInt32, _

ByVal uTimeout As UInt32, _

ByRef lpdwResult As IntPtr _

) As Long

Private Const HWND_BROADCAST = &HFFFF&

Private Const WM_SETTINGCHANGE = &H1A

Private Const SMTO_ABORTIFHUNG = &H2

Public Sub EnvRefresh ( )

Dim dwResult As IntPtr '

SendMessageTimeout(HWND_BROADCAST, _

Convert.ToUInt32(WM_SETTINGCHANGE), _

0, 0, _

Convert.ToUInt32(SMTO_ABORTIFHUNG), _

Convert.ToUInt32(5000), _

dwResult)

MsgBox(dwResult)

gr /\/\o\/\/

  • 2 years later...
Hey,

Can you explain the above code in a little more detail?

What settings are you in danger of losing when you kill explorer.exe and how does the above code remedy this problem?

Should you kill explorer.exe and [i]then[/i] run the above code in a *.vbs file or vice versus?

laze.
Hey,

This refreshes the desktop, but it doesn't refresh the taskbar.

I'm adding additional items to quick-launch and they only show once you've logged out and logged back in again.

Ending a restarting explorer.exe works, your code doesn't.

Thanks for your suggestion though.

laze.
the code /\/\o\/\/ posted cant be used in vbs, it is VB code
the only way i have seen to make API calls from vbs is using a 3rd party activex control like wshAPItoolkit.ocx
you dont have to register the control if you run your script from the same folder as the ocx

you might also try searching the web for something like 'refreshscreen.exe' or something similar

Edited by selyb

What about something like this?[code]Set Wmi = getobject("winmgmts:")
sQuery = "select * from win32_process where name='explorer.exe'"
Set processes = Wmi.execquery(sQuery)
For each process in processes
process.terminate
Next[/code]

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.