Refresh Desktop?

Started by mcjathan, February 13, 2014, 08:10:59 AM

Previous topic - Next topic

mcjathan

Greetings,

I'm looking for some guidance.  I need to be able to refresh my desktop (WinXP & Win7) at times using Winbatch.  With a mouse, you simply right-click on the desktop and choose "Refresh".  How can I do this using Winbatch?

I found this in the Winbatch tech support database:

    http://tinyurl.com/mo5nd3z

However, it looks like this Winbatch tech support file was last updated in 2001.  Is there a better way to refresh the desktop than is shown in this article?

Regards,

Jeff


td

Not sure what you are looking for in a better way but the shell API function mentioned in the article is still part of the Windows shell so the article's technique should still work as well on Windows 8.1 as it did on NT 4.0.

Another possible technique would be to use the WinBatch/WIL WallPaper function specifying your current desktop wall paper. The WallPaper function calls an underlying shell COM interface method to do the equivalent of f5 on the desktop.  I haven't tried this approach so I can't guarantee that it will work but I can't think of a reason why it wouldn't either.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

No guarantees of success but here's the one liner
Code (winbatch) Select

WallPaper(SysParamInfo(115,0,0),0)
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

mcjathan

Thank you, Deanna & td.

You're link to the Winbatch sample code works perfectly for me!

Regards,

Jeff