New
#1
Refresh desktop with a batch (no "Sendkeys F5")
Hi,
I'm not an expert in Windows scripts and programming, but Googling around I've found this code to refresh the desktop/active folder:
The problem is that the desktop (or the folder) must be the active window; for exaple, if I launch the command from a shortcut on the taskbar, the desktop won't be active and it won't refresh (unless I click on the desktop in less than one second); I could increase the wscript.sleep to have more time to click on the desktop, but it won't be comfortable then.Code:set oWSH = wscript.CreateObject("Wscript.Shell") Hme = "Home - Microsoft Internet Explorer" oWSH.appActivate(Hme) wscript.sleep 1000 oWSH.appActivate(hme) oWSH.SendKeys "{F5}"
Is there another smarter way to refresh the desktop?
Thanks in advice.