Re: Script to Refresh Desktop

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



JW, I tried the script but received the below error:

Script: C:\... \Desktop\Desktop Refresh Script.vbs
Line: 6
Char: 4
Error: Object required: 'oItem'
Code: 800A01A8
Source: Microsoft VBScript runtime error

It turns out that there is no underline for "Refresh" on my Win XP SP2
system. I made adjustments per your instructions with no success. Any
advise while I continue to identify the error?
--
Thanks,
Chris A. Zanowick


"Chris A. Zanowick" wrote:

Thanks, JW!

This will be helpful. Now, all I have to do is get this into a schedule, as
this will only perform a single refresh command. My goal is to have it loop
every so many minutes and set the registry to start the VBS script file on
startup. Unless, you can suggest a better way.

I just realized how screwed-up my IE program is now, after upgrading from
version 6 to version 7. Just don't know if Microsoft will fix what they
broke.
--
Thank you,
Chris A. Zanowick


"mr_unreliable" wrote:

hi Chris,

Try this:

--- <snip> ---
Set oShellApp = CreateObject("Shell.Application")
Set oFolder = oShellApp.NameSpace("C:\WINDOWS\")
Set oItem = oFolder.ParseName("DESKTOP")
' note: for the refresh verb (or any verb) to work, it MUST BE EXACT,
' including any underline (you use "&" to prefix the underlined
character)
oItem.InvokeVerb "Re&fresh" ' (works for U.S. spelling)

msgbox("finished desktop refresh, quitting now.. ")
WScript.Quit
--- </snip> ---

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)




Chris A. Zanowick wrote:
Hello Everyone,

Has anyone out there written a script to run at startup that refreshes the
desktop every so many minutes? Trying to implement a script to work around
the broken Active Desktop Items-Schedule Update problem Microsoft created by
the current installation of IE 7. Able to still add items, e.g. weather
radar maps, to the desktop, but scheduled updates function is broken.
Thought a script would be a good workaround for the time being.

.



Relevant Pages

  • Re: Script to Refresh Desktop
    ... It turns out that there is no underline for "Refresh" on my Win XP SP2 ... Sounds more like there is no "desktop" for a scheduled script. ... "Chris A. Zanowick" wrote: ... Just don't know if Microsoft will fix what they ...
    (microsoft.public.scripting.wsh)
  • Re: Copy & paste from IE/FF into a new Outlook email via VBScript
    ... The software exports the job sheets as a HTML file. ... fire up a script in Outlook to automatically refresh the ... browser window/tab, copy the content across into a new email and send ... WshShell.SendKeys "" 'Refresh ...
    (microsoft.public.scripting.vbscript)
  • Re: Dynamic HTML from Python Script
    ... To create the CGI script, I used Flaming Thunder's cross compiling ... I then ftp'd refresh.cgi up to the cgi directory on my server, ... just need to refresh the static file in your browser to see updates... ...
    (comp.lang.python)
  • Re: IE Page Freezes
    ... I have a website ... > refresh occurs the page stops rendering at the point where my script ...
    (comp.lang.php)
  • Re: How to refresh the imported data from XML data?
    ... > database, or after I open the database, there is a button that can do ... > want a button to refresh the data to the updated data in the table. ... > "Chris Reveille" wrote: ... >> Are you importing the data directly into the tables? ...
    (microsoft.public.access.externaldata)