Page 1 of 1 1
Topic Options
#15683 - 2002-01-03 11:20 PM IF INGROUP then run xcopy help!!
Anonymous
Unregistered


Hi all,

I'm about as new as you can get to kixtart, and I've had to hit the ground running. I need to come up with a login script that will copy a file down to a client machine if the source file is newer than the source. This will only happen if the user is a member of a particular NT global group. I don't know enough about kixtart yet to determine if it's best to make this part of the rest of the script or to make a call to a seperate script. At the moment, I have the below code in my script and it's not working.

IF INGROUP ("AODB") = 1
md c:\ausopen
RUN "xcopy p:\ausopen\*.* c:\ausopen\*.* /d"
SLEEP 10
END IF

Nasty I know. This lumped in with the rest of the login script. If anyone has any suggestions as to how I might change the code or if I should use another program to copy the file, that would be great. The clients are mostly Win98. Thanks.

Top
#15684 - 2002-01-04 12:15 AM Re: IF INGROUP then run xcopy help!!
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Welcome dcell

A question and some suggetions:

1) Is your INGROUP() working properly ? I mean, is it properly determining group membership and trying to perform the xcopy ? Might try putting in a display statement after the ingroup() just to make sure:

IF INGROUP ("AODB") = 1
?"User is member of AODB"
...
ENDIF


2) I would code your xcopy using the shell command, like this:

shell '%comspec% /c xcopy p:\ausopen\*.* c:\ausopen\*.* /d'

this usage will automatically wait for the xcopy to finish and you can get rid of the sleep 10 !

3) The END IF should be coded as ENDIF

-Shawn

Top
#15685 - 2002-01-04 03:39 PM Re: IF INGROUP then run xcopy help!!
Anonymous
Unregistered


Here's a clip from our script to copy from the pc to server. I'm not sure why you would need to make it a seperate script if you're already qualifying the groups to run that section.

Check out the different xcopy switches available to see which fit your purpose. Some only exist in certain versions of Windows.

Check the above post as well.

Go C:
SHELL "XCOPY C:\MyDocu~1\*.* U:\MDBackup\*.* /i /e /r /y /k /h /q"

[ 04 January 2002: Message edited by: kix me ]

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 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

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