Winsock error 10013 WSAEACCES

This is because access to raw sockets is denied in NT4 and Win2000 for non-Administrator users. You can overcome this in two ways:

#1 - Set the UseICMPDLL config property to true.

#2 - Alter your system to allow access to raw sockets.

Here is what Microsoft has to say about this issue:

Q195445 - PRB: RAW Socket Access Denied to Non-Admin Windows NT 4.0 and Windows 2000 Users

The information in this article applies to: Microsoft Win32 Software Development Kit (SDK), used with: Microsoft Windows NT 4.0 SP4 Microsoft Windows 2000

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SYMPTOMS A Socket or WSASocket call that specifies the SOCK_RAW socket type fails with Winsock error 10013 WSAEACCES if the user is a non-administrator logged onto a Windows NT 4.0 or Windows 2000 system.

CAUSE This is by design.

RESOLUTION In Windows 2000, there is no way to disable this security check. Access to Raw Sockets is granted on a per-transport basis. For the address family AF_INET, only administrators have the access necessary to create Raw Sockets.

To work around this problem in Windows NT 4.0, you can disable the security check on RAW sockets by creating the following registry variable and setting its value to DWORD 1:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Afd\Parameters\ DisableRawSecurity

After you change the registry, you need to restart your computer.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

Additional query words: SOCK_RAW AF_INET Keywords : kbnetwork kbWinOS2000 kbSDKPlatform kbWinsock kbNTOS400sp4 kbGrpNet Version : WINDOWS: Platform : WINDOWS Issue type : kbprb Technology : Last Reviewed: February 4, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at