I have written a batch file which adds the appropriate entry into the registry (it is actually two batch files, one for 32 bit and one for 64 bit). I am not sure how to get this to run with parameters though. I know %1 and %2 would be for the first two parameters, but when I run this, in the registry it actually puts %1 and %2 as the value pair.
if you hardcode hostname and IP Address in place of %1 and %2 the batch file works as expected:
Code: Select all
REGEDIT4
; @ECHO OFF
; CLS
; REGEDIT.EXE /S "%~f0"
; EXIT
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo]
"%1"="DBMSSOCN,%2,1433"