Solved

Command to refresh desktop

Posted on 2006-10-31
13
14,617 Views
Last Modified: 2013-11-21
I have a logon script that copies folders to users desktops.

I note however that if the folders  are created through a batch file (or command prompt) they will not display unless the user refreshes the desktop.

I would like to automatically refresh the desktop through my logon script.

Do any experts, know of a command that will perform a desktop refresh

Regards

Jim
0
Comment
Question by:jsulliva1957
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +5
13 Comments
 
LVL 9

Expert Comment

by:crawfordits
ID: 17846263
0
 
LVL 11

Expert Comment

by:Paul S
ID: 17846391
0
 

Author Comment

by:jsulliva1957
ID: 17846421
Thanks crawfordits, however this does not do the job for me.

The desktop that I am changing is "all users" rather than the users. It appears that the utility only refreshes the user desktop.
0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 3

Assisted Solution

by:JRockSolid
JRockSolid earned 250 total points
ID: 17847629
How about appending this in the end of your Batch Script

taskkill /F /im explorer.exe
explorer.exe


Works for me
0
 
LVL 5

Expert Comment

by:Yogalingam
ID: 17848428
How about this

@ECHO OFF
rem - By Windows Setup - c:\windows\command\mscdex.exe /D:aspicd0 /M:12 /L:I
PATH=%PATH%;
if exist c:\windows\smartdrv.exe c:\windows\smartdrv.exe 2048 16
DELTREE /y c:\windows\history\*.* > NUL
DELTREE /y c:\windows\tempor~1\*.* > NUL
DELTREE /y c:\windows\temp\*.* > NUL
DELTREE /y c:\windows\cookies\*.* > NUL
DELTREE /y c:\windows\applic~1\micros~1\office\recent\*.* > NUL
DELTREE /y c:\windows\ShellIconCache
if exist del c:\windows\ff*.tmp
if exist del c:\windows\system\advert.dll

Through this bach file it removes the index.dat files also. Save file as .bat extension
0
 
LVL 5

Expert Comment

by:Yogalingam
ID: 17848430
For more information see link

http://hardwarehell.com/articles/bootclean.shtml
0
 
LVL 4

Accepted Solution

by:
KellyCraig earned 250 total points
ID: 17850354
Hello there!

Please add this to your logon script and let me know if that works.
It basically causes explorer to reload instantly without disrupting the user.

--Kelly

--command--
wmic.exe process where name="explorer.exe" call TERMINATE
--

0
 

Author Comment

by:jsulliva1957
ID: 17853725
Thanks everyone,

The solution that best meets my needs is from JRockSolid and KellyCraig, because of its simplicity.

I particularly like KellyCraigs, because it terminates explorer and reloads it with the single command, however both solutions solve my problem.

Cheers


Jim



0
 
LVL 4

Expert Comment

by:KellyCraig
ID: 17853744
Thanks!
I'm glad to be of service!

--Kelly
0
 
LVL 3

Expert Comment

by:JRockSolid
ID: 17854100
I liked KC's better myself and have added it to my arsenal. :)
0
 
LVL 4

Expert Comment

by:KellyCraig
ID: 17854448
Ha!
Yea, I discovered WMI, and have been addicted ever since, its the single greatest tool a geek can have IMHO, for both good and evil deeds XD
--Kelly
0
 

Expert Comment

by:Dabosa
ID: 32640678
JRockSolid: I like yours and I want to use it beacuase its faster and it does not load everything the same way.
However the command window ill not close eventhough i have EXIT.

any idea? shall i create a new request?

thanks
Dab
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question