Re: Script to Refresh Desktop
- From: "Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 2 Sep 2007 14:53:26 -0600
"Chris A. Zanowick" <chris_zanowick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:29A496F9-6B14-4AE5-A8A6-95CF70297967@xxxxxxxxxxxxxxxx
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?
Sounds more like there is no "desktop" for a scheduled script. Even if you
schedule a task using the same credentials as the one you are logged on with
interactively, its "desktop", if it had one, would not be the one you see,
as this would be a separate process.
/Al
--
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.
.
- Prev by Date: Re: Installing WSH
- Next by Date: Re: "CScript Error: Can't find script engine "VBScript" for script
- Previous by thread: Re: Script to Refresh Desktop
- Next by thread: Re: Installing WSH
- Index(es):
Relevant Pages
|