15
edits
Changes
no edit summary
==A WPKG Package to create an ODBC Connection==
===The Installer Package===
<pre>
<package id="ODBC_CONN_X"
<check type="registry" condition="equals" path="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\%ODBC_DSN_NAME%" value="%ODBC_DRIVERNAME%" />
<install cmd="xcopy /Y "%WPKGHOME%\ODBC\%ODBC_TEMPLATE_FILE%" "%LOCALDOWNLOADS%\"" />
<install cmd="%tools%\TxtReplace\TxtReplace.exe -i "%LOCALDOWNLOADS%\%ODBC_TEMPLATE_FILE%" -r __ODBC_DSN_NAME__ "%ODBC_DSN_NAME%" -r __ODBC_DESCRIPTION__ "%ODBC_DESC%" -r __ODBC_DBSERVER__ "%ODBC_DBSERVER%" -r __ODBC_DBNAME__ "%ODBC_DBNAME%" " />
</package>
</pre>
===The Registry Template===
This requires "TxtReplace.exe" substitution utility, and "reg.exe" from the Windows 2000 resource kit (on the W2K CD)
<pre>
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"__ODBC_DSN_NAME__"="SQL Server"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\__ODBC_DSN_NAME__]
"Driver"="C:\\WINDOWS\\system32\\SQLSRV32.dll"
"Description"="__ODBC_DESCRIPTION__"
"Server"="__ODBC_DBSERVER__"
"Trusted_Connection"="Yes"
</pre>