update vbs script for ODBC connection to include a password

I have a script: but I need now to include a password for this script please:
This is a code pulled off the internet.

'***************************************************************
'*****
'*****      This script creates a DSN for connecting to a
'*****      SQL Server database. To view errors comment out line 16
'*****
'*****      Script Name: AutoDSN_CPIR_DataViewer.vbs
'*****      Author: original by:Darron Nesbitt
'*****      Depends: VBScript, WScript Host
'*****      Created: 09/26/2010 (original on:10/2/2001)
'*****
'***************************************************************

'Values for variables on lines 25 - 29, 32, and 36
'must be set prior to running this script.

      On Error Resume Next

      Dim RegObj
      Dim SysEnv

      Set RegObj = WScript.CreateObject("WScript.Shell")

      '***** Specify the DSN parameters *****

    DataSourceName = "Sql_2005_Express2"
 '   DatabaseName = "Default"
    Description = "Main Database Connection"
    LastUser = "sa"
    Server = "2CE942HWD1\SQLEXPRESS"

       'if you use SQL Server the driver name would be "SQL Server"
    DriverName = "SQL Server"

       'Set this to True if Windows Authentication is used
       'else set to False or comment out
    WindowsAuthentication = false

      'point to DSN in registry
    REG_KEY_PATH = "HKLM\SOFTWARE\ODBC\ODBC.INI\" & DataSourceName

   ' Open the DSN key and check for Server entry
        lResult = RegObj.RegRead (REG_KEY_PATH & "\Server")

      'if lResult is nothing, DSN does not exist; create it
        if lResult = "" then

        'get os version through WSCript Enviroment object
         Set SysEnv = RegObj.Environment("SYSTEM")
        OSVer = UCase(SysEnv("OS"))

         'check which os is running so correct driver path can be set
        Select Case OSVer
          Case "WINDOWS_NT"
              DrvrPath = "C:\WinNT\System32"
          Case Else
              DrvrPath = "C:\Windows\System"
        End Select

        'create entries in registry
        RegObj.RegWrite REG_KEY_PATH & "\DataBase",DatabaseName,"REG_SZ"
        RegObj.RegWrite REG_KEY_PATH & "\Description",Description,"REG_SZ"
        RegObj.RegWrite REG_KEY_PATH & "\LastUser",LastUser,"REG_SZ"
        RegObj.RegWrite REG_KEY_PATH & "\Server",Server,"REG_SZ"
        RegObj.RegWrite REG_KEY_PATH & "\Driver",DrvrPath,"REG_SZ"

        'if WindowsAuthentication set to True,
        'a trusted connection entry is added to registry
        'else, SQL Authentication is used.
        if WindowsAuthentication = True then
          RegObj.RegWrite REG_KEY_PATH & "\Trusted_Connection","Yes","REG_SZ"
        end if

        'point to data sources key
        REG_KEY_PATH = "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\" & DataSourceName

        'and add the name of the new dsn and the driver to use with it
        RegObj.RegWrite REG_KEY_PATH,DriverName,"REG_SZ"

        MsgBox DataSourceName & " DSN Created!"

      else
            MsgBox DataSourceName & " DSN already exists!"
      end if

      Set RegObj = Nothing
      Set SysEnv = Nothing



'***************************************************************
'  END AutoDSN.txt
'***************************************************************

Thanks
fordraiders
LVL 3
FordraidersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MlandaTCommented:
This might help. It explains where the password needs to go.

http://knowledgebase.progress.com/articles/Article/2987
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FordraidersAuthor Commented:
what i ended up doing was exporting the current System DSN connection from the registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI]

Saving as a .reg   file..

Double clicking it will re-install the DSN with password !

fordraiders
0
FordraidersAuthor Commented:
Thanks, at least gave me the idea to export the connections..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.