Your code may work is certain cirmstances, but it does need to be reviewed and corrected to work as I think you intended it to work.
For instance: code:
if INGROUP("Everyone")
? "Member of Everyone group"
USE I: /delete /Persistent
use I: "\\FS2\APPS"
If Exist ("c:\windows\RD.bat") = 0
If Exist ("c:\windows\RD.pif") = 0
If Exist ("c:\windows\MSTSc.exe") = 0
If Exist ("c:\windows\MSTSCAX.DLL") = 0
copy "\\W2K2\netlogon\RD.BAT" "c:\windows"
copy "\\W2K2\netlogon\RD.PIF" "c:\windows"
copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
The copy commands will only ever execute when ALL the IF statements return true. Is that what you wanted? If so this does the same thing:
code:
if INGROUP("Everyone")
? "Member of Everyone group"
USE I: /delete /Persistent
use I: "\\FS2\APPS"
If Exist ("c:\windows\RD.bat") = 0 and
Exist ("c:\windows\RD.pif") = 0 and
Exist ("c:\windows\MSTSc.exe") = 0 and
Exist ("c:\windows\MSTSCAX.DLL") = 0
copy "\\W2K2\netlogon\RD.BAT" "c:\windows"
copy "\\W2K2\netlogon\RD.PIF" "c:\windows"
copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
ENDIF
ENDIF
Oh and why the Ingroup("Everyone")? If you want everyone then execute the code for everyone without the added overhead of checking a group?
My guess is that you reall want something like: code:
USE I: /delete /Persistent
use I: "\\FS2\APPS"
If Exist ("c:\windows\RD.bat") = 0
copy "\\W2K2\netlogon\RD.BAT" "c:\windows"
Endif
If Exist ("c:\windows\RD.pif") = 0
copy "\\W2K2\netlogon\RD.PIF" "c:\windows"
Endif
If Exist ("c:\windows\MSTSc.exe") = 0
copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows"
Endif
If Exist ("c:\windows\MSTSCAX.DLL") = 0
copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows"
Endif
[ 04. December 2002, 01:30: Message edited by: Howard Bullock ]