Correction on the script:

if %allusersprofile%
? "Windows 2000"
$AllUsersProfile=%allusersprofile%
Else
$AllUsersProfile="%systemroot%\Profiles\All Users"
EndIf