Either way would work.

I prefer to use UDFs as the call to the UDF usually makes it clear what's happening. \:\) I also don't have to remember all of the different ways to get reg data. In this case, you're getting "6.3" instead of "10.0" - it comes down to readability for later support.

Our login script can do this kind of stuff natively, so it's just one script, one config file. I tend to avoid using multiple scripts or config files whenever possible. My last deployment was probably the exception - one script, but one config file for each RDS host - there were about 20 - one to support administration of each major financial platform. The ability to use host-specific config files came in handy!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D