General discussion
February 20, 2003 at 03:05 AM
mike_anderson

Shell Scripting with xcopy, NT/2000

by mike_anderson . Updated 23 years, 7 months ago

I have worked on a script that runs fine untill I add a new group. When the script gets to the new group the script just disappears.

if InStr(@ProductType,”Windows 2000 Professional”)
shell ‘cmd /c xcopy p:\GroupProfiles\AllUsers\profile\*.* C:\Docume~1\%username% /e/y>nul’
Else
shell ‘cmd /c xcopy p:\GroupProfiles\AllUsers\profile\*.* %userprofile% /s/e>nul’
endif
“.” ?
; Sets the local workstation time to the Domain time
color w/b “Setting Time”
; settime “PDC”
“.” ?
color w/n
endif
if ingroup(“Normal Users”)
color w/b
“Normal Users”
“.” ?
color w/n
EndIf
if ingroup(“Power Users”);Script crashes here;
color w/b
“Power Users”
“.”
if InStr(@ProductType,”Windows 2000 Professional”)
shell ‘cmd /c xcopy p:\GroupProfiles\PwrUsers\profile\*.* C:\Docume~1\%username% /e/y>nul’
Else
shell ‘cmd /c xcopy p:\GroupProfiles\PwrUsers\profile\*.* %userprofile% /s/e>nul’
endif
“.” ?
color w/n
EndIf

The script crashes, or disappears, at the “if ingroup(“Power Users”)” line. The group does exist and works in our NT only script or our 2000 only script. This script configuration works on our remote office script but not in our Corporate script. If I block this line it will go through several groups but come to another group that cause the script to go away.

Any Ideas?

This discussion is locked

All Comments