Page 1 of 1 1
Topic Options
#190476 - 2008-11-03 10:19 PM Need help using Robocopy
Gigman Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 5
Loc: MA
Hi everyone! I am currently using KiXtart to setup printers, map drives and (hopefully) soon manage user icons.
Ill post my script here and then ask my questions
 Code:
;=============================================
; App Shortcuts - Use Robocopy
;=============================================

If InGroup("Domain Users")
SHELL 'robocopy.exe "\\SERVER-A\NETLOGON\Desktop Icons" "%USERPROFILE%\Desktop\"'
EndIf


Currently this part of the script will not work. The other two parts before it do (mapping printers/drives) so I know KiX works. I have robocopy.exe in my \\server\NETLOGON\ folder. Can someone enlighten me as to what I am doing wrong? Also I would like the script to remove all icons currently in the users profile and then add these back in. Could someone tell me how to do this?
Thanks
-Ian

Top
#190479 - 2008-11-03 10:55 PM Re: Need help using Robocopy [Re: Gigman]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
add this after your shell line and we will be all lot wiser:
@error get $
_________________________
!

download KiXnet

Top
#190481 - 2008-11-03 11:06 PM Re: Need help using Robocopy [Re: Lonkero]
Gigman Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 5
Loc: MA
Hi, thanks for that little bit of info, I saw what was wrong (it needed to be "...desktop" no \) But now I have just one more question before I roll out the script, can I have KiX check the "C:\Documents and Settings\All Users\Desktop" and look for the files that it is robocopy-ing and should they be there delete them?
Thanks
-Ian

Top
#190482 - 2008-11-03 11:17 PM Re: Need help using Robocopy [Re: Gigman]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, if you wanna keep it clean, just tell robocopy to /mir
_________________________
!

download KiXnet

Top
#190485 - 2008-11-03 11:29 PM Re: Need help using Robocopy [Re: Lonkero]
Gigman Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 5
Loc: MA
But Im talking about two different dirs. How would I use that? One in the All Users desktop and one in the %UserProfile%s. Is there anyway to just clear All Users at logon/startup?
Thanks
-Ian

Top
#190497 - 2008-11-04 06:17 PM Re: Need help using Robocopy [Re: Gigman]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
Is there a reason you need to use Robocopy instead of KiXtart's built-in copy?

 Code:
If InGroup("Domain Users")
     DEL "%USERPROFILE%\Desktop\*.ico" ; you wanted to remove all their desktop icons, correct?
     COPY "\\SERVER-A\NETLOGON\Desktop Icons\*.*" "%USERPROFILE%\Desktop\*.*"
EndIf


To use the "all users" profile instead, just change "%USERPROFILE% to %ALLUSERSPROFILE%.


Edited by eriqjaffe (2008-11-04 06:19 PM)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.042 seconds in which 0.02 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org