Hi,
I'm successfully creating a new DSN using vbscript, but I can't get it
to set the default Login name. The default login can be found in the
odbc administrator under the advanced tab. I don't want to have to
enter that in manually on users computers/

Here's a section of my code:
[code]
'WshShell.RegWrite RegEdPath & "Database" , DatabaseName
WshShell.RegWrite RegEdPath & "Description" , Description
WshShell.RegWrite RegEdPath & "Driver" , DriverPath
WshShell.RegWrite RegEdPath & "LastUser" , "UID"
'WshShell.RegWrite RegEdPath & "Server" , Server

WshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\"
& DataSourceName , DriverName
[/code]

The user I'm trying to use as the default login is - UID

Thanks for your help

Re: vbscript create dsn - Default Login Name by Robert

Robert
Tue Jan 25 23:57:20 CST 2005

Robert Bradshaw wrote:
> Hi,
> I'm successfully creating a new DSN using vbscript, but I can't get it
> to set the default Login name. The default login can be found in the
> odbc administrator under the advanced tab. I don't want to have to
> enter that in manually on users computers/
>
> Here's a section of my code:
> [code]
> 'WshShell.RegWrite RegEdPath & "Database" , DatabaseName
> WshShell.RegWrite RegEdPath & "Description" , Description
> WshShell.RegWrite RegEdPath & "Driver" , DriverPath
> WshShell.RegWrite RegEdPath & "LastUser" , "UID"
> 'WshShell.RegWrite RegEdPath & "Server" , Server
>
> WshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\"
> & DataSourceName , DriverName
> [/code]
>
> The user I'm trying to use as the default login is - UID
>
> Thanks for your help


nevermind I ended up inserting the DSN as a registry entry.