Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

manually importing ODBC reg key into registry

$
0
0

Good Afternoon 

Im trying to manually install the registry key into a machine using powershell i know that i can import the file but that leaves a risk that if the source file ever gets deleted or moved the script will not work, So what i want to do is import the regkey manually into another machine using power shell below is a small example of the reg key that i want to import 

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC]

 

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

 

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

"Driver"="C:\\Sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"

"dsn"="CAPSTONE_DB"

"dsprincipal"=""

"secondaryport"=""

"logintimeout"="15"

"restrictmaximumpacketsize"="0"

"normalizewcharparams"="0"

"ignoreerrorsifrspending"="0"

"initializationstring"=""

"alternateservers"=""

"dsservicename"=""

"database"=""

"packetsize"=""

"encryptpassword"="0"

"server"="CAPSTONE_DB"

"serverinitiatedtransactions"="1"

"quotedidentifier"="0"

"charset"="ServerDefault"

"ansinull"="1"

"fetcharraysize"="25"

"servicename"=""

"language"=""

"buffercachesize"="20"

"trustedfile"=""

"tightlycoupledtransaction"="0"

"serverprincipal"=""

"port"="5000"

"userid"="sa"

"hasession"="0"

"enableserverpacketsize"="1"

"applicationname"=""

"userprincipal"=""

"description"=""

"dsurl"=""

"crc"="1"

"backendtype"="ASE"

"dynamicprepare"="0"

"secondaryserver"=""

"textsize"=""

"clienthostproc"=""

"clienthostname"=""

 

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

"Driver"="C:\\windows\\system32\\SQLSRV32.dll"

"Description"="DBCTPDEV"

"LastUser"="ctp"

 

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

"Driver"="C:\\windows\\system32\\SQLSRV32.dll"

"Description"="DBCTPPROD"

"LastUser"="risk"

 

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

"Driver"="C:\\windows\\system32\\SQLSRV32.dll"

"Description"="dbriskdev"

"Server"="dbriskdev"

"LastUser"="risk"

 

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

"Driver"="C:\\windows\\system32\\SQLSRV32.dll"

"Description"="dbriskprod"

"Server"="dbriskprod"

"LastUser"="risk"

 

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

"CAPSTONE_DB"="Adaptive Server Enterprise"

"dbriskprod"="SQL Server"

"dbriskdev"="SQL Server"

"DBCTPPROD"="SQL Server"

"DBCTPDEV"="SQL Server"

"SQLServerDev"="SQL Server"

 

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

"Driver"="C:\\windows\\system32\\SQLSRV32.dll"

"Server"="DBCTPDEV"

"LastUser"="risk"

 

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

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Adaptive Server Enterprise]

"driver"="C:\\Sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"

"Setup"="C:\\Sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"

"APILevel"="1"

"ConnectFunctions"="YYY"

"DriverODBCVer"="03.51"

"FileUsage"="0"

"SQLLevel"="0"

"CPTimeout"="60"


Viewing all articles
Browse latest Browse all 6937

Trending Articles