Subject: help please
Posted By: alfoos Post Date: 10/14/2006 2:25:27 PM
Hi,

I have created a program which uses access as the database. I wish to give it to my friends, but some of them are not much aware of windows administration.

Can i create a .bat file which can add the DSN for my database

Thanks in advance,

Alfahed p m
Reply By: mmcdonal Reply Date: 10/17/2006 2:21:23 PM
You need to create a .vbs script that will create the DSN.

Here is one for a SQL Server to get you started.

Uninstall your current DSN, then install it and note the changes, and document them.

You could also use a DSN-less provider statement so you wan't have to do this.

Let me know if you need additional help.

'------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Description", "SQL"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Driver", "C:\Windows\System32\\SQLSRV32.dll"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\LastUser", "Unknown"
WshShell.RegWrite "HKLM\Software\ODBC\ODBC.INI\AssetManagement\Server", "SQLDatabaseName"
WshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\AssetManagement", "SQL Server"
'----------------------------------------

mmcdonal

Go to topic 51125

Return to index page 146
Return to index page 145
Return to index page 144
Return to index page 143
Return to index page 142
Return to index page 141
Return to index page 140
Return to index page 139
Return to index page 138
Return to index page 137