I found a script that will create a DSN.. could be modified for your purpose, I believe (although it's in VBScript.)

http://www.swynk.com/winscript/SCRIPT_AutoDSN.asp

Brian