I'm not an expert in Windows scripts and programming, but Googling around I've found this code to refresh the desktop/active folder:
set oWSH = wscript.CreateObject("Wscript.Shell")
Hme = "Home - Microsoft Internet Explorer"
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.
Is there another smarter way to refresh the desktop?
Thanks in advice.