We all have our reasons for wanting to do this, some may be for the “right” reasons, while others are not. It can be argued that disabling the IPv6 protocol is not appropriate and that it may effect some Windows functionality. However, IPv6 has been the culprit to some recent anomalies, including on a Windows Vista build where IIS could not be accessed via an IP address. Anyway, here is the short version of how to disable IPv6 by editing the registry.
Copy the code below into your favorite text editor and save it with the file extension of reg. For example,
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters] "DisabledComponents"=dword:00000000