Might have some typos... i just threw this together... post your results.

 Code:
? @kix
? @producttype
if exist("S:\")
  ? "S: Exists"
  ? net use s: /delete /persistent
  ? @result
  ? @error
  ? @serror
endif
if not exist("S:\")
  ? "S: Does not Exist"
  ? "Mapping Drive"
  $Path="\\E500SRV2\SHARE"
  if exist($path)
    USE S: $path 
    ? @result
    ? @error
    ? @serror
  else
    ? "Path does not exist"
  endif
endif