Changes

ODBC Connection

59 bytes removed, 02:20, 18 October 2010
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&#92;SOFTWARE&#92;ODBC&#92;ODBC.INI&#92;ODBC Data Sources&#92;%ODBC_DSN_NAME%" value="%ODBC_DRIVERNAME%" />
<!-- <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;ODBC&#92;ODBC.INI&#92;%ODBC_DSN_NAME%&#92;Server" /> --> <!-- <install cmd="cmd /c %tools%\reg.exe add &quot;HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;ODBC&#92;ODBC.INI&#92;ODBC Data Sources&quot; /v &quot;%ODBC_DSN_NAME%&quot; /t REG_SZ /d &quot;SQL Server&quot; " /> <install cmd="cmd /c %tools%\reg.exe add &quot;HKEY_LOCAL_MACHINE&#92;SOFTWARE&#92;ODBC&#92;ODBC.INI&#92;%ODBC_DSN_NAME%&quot;" /> --> <!-- HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\__ODBC_DSN_NAME__ -->
<install cmd="xcopy /Y &quot;%WPKGHOME%\ODBC\%ODBC_TEMPLATE_FILE%&quot; &quot;%LOCALDOWNLOADS%\&quot;" />
<install cmd="%tools%\TxtReplace\TxtReplace.exe -i &quot;%LOCALDOWNLOADS%\%ODBC_TEMPLATE_FILE%&quot; -r __ODBC_DSN_NAME__ &quot;%ODBC_DSN_NAME%&quot; -r __ODBC_DESCRIPTION__ &quot;%ODBC_DESC%&quot; -r __ODBC_DBSERVER__ &quot;%ODBC_DBSERVER%&quot; -r __ODBC_DBNAME__ &quot;%ODBC_DBNAME%&quot; " />
</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>
15
edits