I have created a script to create an ODBC connection on a PC, as it needs to go on hundreds of PCs for a new software roll-out. The only setting I can't seem to find a command line for is changing the Network Libraries from TCP/IP to Changed Pipes.
Sorry, don't know the answer to your question, but I'm surprised you want to use Named Pipes rather than TCP/IP - my understanding was that TCP/IP was much preferable ... but perhaps that isn't the case?
I would highly recommend powershell script for that specific issue.
With powershell you can tap into .Net Classes, which takes your scripting to a new level.
set dsn_name=APP_NAME
set config_dsn=configsysdsn "SQL Server" "DSN=%dsn_name%|Server=SERVER_NAME|Database=DB_NAME|Trusted_Connection=yes|Language=British"
basically in windows the tool you use to change client side protocols is a tool that should come out of the box called
SQL Server Client Network Utility and is
C:\Windows\System32\cliconfg.exe
Any changes you make using this above tool basically writes an entry in your registry at
so you can still use bat file and write the values you want to the registry. Create the value manually to see what the registry value data is. Mine looked something like the following.