Disable Named Pipes in SQL Server

Here is the Way  to Disable Named Pipes using TSQL script.

EXEC master..xp_instance_regwrite
    N'HKEY_LOCAL_MACHINE',
    N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib\Np',
    N'Enabled',
    REG_DWORD,
    0
GO