We help IT Professionals succeed at work.

batch to copy to all desktops in windows vista and 7

icecom4
icecom4 asked
on
I need the windows vista/& version of the command line below...
COPY /y \\server\deploy\*.* "C:\DOCUME~1\All Users\DESKTOP\"    <<---this is the WINXP line

This should be a script that runs on the local computer but copies files to ALL account desktops not just the one that the scripted is being executed from.  I tried using %userprofile% but again that only copies to the account being executed from.  

It must be a simple batch command that runs from the local desktop as I am using psexec.  

Thank you.  
Comment
Watch Question

Commented:
Try C:\Users\Public\Desktop. If you can't see it unhide hidden folders.
Create batch file using following command
for /F %%a in ( 'dir /ad /b c:\users\' ) do (copy \\server\deploy\*.* c:\users\%%a\desktop\ /y)

to run from command line instead of batch file replace %%a with %a
or

copy \\\server\deploy\*.* c:\users\public\desktop

Author

Commented:
Cool guys thanks.  These all worked.  Good to know that the folder was hidden.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.