Why don't you use Jen's UDF OSID to extract the OS type & Service pack info? I use this UDF at the start of most of my scripts in order to handle the various OS that are logging on. It is a bit of overkill but it helps standardize scripts.
_________________________
Jack