Paul,
you're not keeping up to the posts. Pull up those socks. [Big Grin]

Since you talked about going to AD (actually you said 2000 domian), I assumed that KiX 4 was in the plan. No big deal, for now... you can do it without the UDF. There are enough features in KiX 4 however that you should consider it.

SELECT CASE is a best practice. You can do multiple IFs but it's not as clean.

Like I said, check out the FAQ I pointed out. It answers the %comspec% question. To reiterate, I strongly urge you to move the functionality out of the BAT into KiX if at all possible.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.