Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Refresh desktop or explorer shell

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,30608
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Refresh desktop or explorer shell
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Refresh desktop or explorer shell - 2/2/2006 10:10:58 PM   
  bigfatgreedykat

 

Posts: 34
Score: 0
Joined: 2/2/2006
Status: offline
Hello all

I have created a script that will copy users My Documents to there Home drive on a server.
The script then changes path in registry to change target path for My Documents.

Unfortunately, i need to stop or terminate the explorer process. Once the explorer is reloaded the registry changes can be viewed.

Can someone please advise how to refresh desktop.

Your advice is greatly appreciated.

thanks

BFGK
 
 
Post #: 1
 
 RE: Refresh desktop or explorer shell - 2/2/2006 10:47:19 PM   
  ginolard


Posts: 1068
Score: 21
Joined: 8/10/2005
Status: offline
Try this

Set WApp = CreateObject("Shell.Application")
WApp.Namespace(0).Self.InvokeVerb "Refresh"

Incidentally, I found that by typing vbscript refresh desktop into Google ;)

(in reply to bigfatgreedykat)
 
 
Post #: 2
 
 RE: Refresh desktop or explorer shell - 2/2/2006 10:53:10 PM   
  bigfatgreedykat

 

Posts: 34
Score: 0
Joined: 2/2/2006
Status: offline
Thanks

I found this as well but it did not work!!!

Did it work for you???

BFGK

(in reply to ginolard)
 
 
Post #: 3
 
 RE: Refresh desktop or explorer shell - 2/2/2006 11:33:11 PM   
  crazymatt

 

Posts: 296
Score: 0
Joined: 3/4/2005
From:
Status: offline
That used correctly only refreshes the desktop, and with desktop in this case that means same as pressing F5 in the desktopview ( without having any other apps running.)


      

If what you want to do is restart the explorer process, search the forums for "kill process" and you will get quite few hits on the subject.
And the tip about searching the forums comes from the "Read me first"-post on top of this forum if ya missed that ;P

/CM

_____________________________

-There is only 10 sorts of people, those who understand binary and those who dont.

(in reply to bigfatgreedykat)
 
 
Post #: 4
 
 RE: Refresh desktop or explorer shell - 2/3/2006 1:50:19 AM   
  bigfatgreedykat

 

Posts: 34
Score: 0
Joined: 2/2/2006
Status: offline
Thanks

I searched site and found script needed to refresh desktop correctly. Actually a kill process that terminated Explorer.exe.

Thanks for all you help.

BFGK

(in reply to crazymatt)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Refresh desktop or explorer shell Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts