Winsock2 Fix
IMPORTANT NOTE: The author of this program has graduated from Boston University and we do not offer any technical support for this fix. Please do not contact us to ask questions about this tool. We leave this page up as a courtesy to the many people who still come to it through search engines and outside links, but we will no longer answer any questions about it.
Having said that, we still hear from people who were happy to have found this page, so we assume the content is good. If you want to give it a try, here it is... If you need assistance, you may want to consult the error codes listed at the bottom of this page.
Winsock2 Fix (w2fix.exe)
Written by Tom Kynch, class of ~2001ish
This program should (only) be used on Windows 98, 98SE, or Windows Me computers whose Winsock2 information has been corrupted by poorly-written Internet programs or spyware.
This program is designed to fix a situation where all of the following are true:
- the computer can get a valid IP address
- the computer can ping DNS numbers
- the computer can be pinged from other computers
- all other network services do not work (Telnet, ftp and Web browsers)
This program removes the Winsock2 key from the Registry and uninstalls then reinstalls Dial-up Networking. A backup of the registry is made before any changes are attempted (the registry is backed up to user.tom system.tom).
Instructions for the Winsock 2 Fix:
IMPORTANT: w2fix.exe ONLY WORKS for Windows 98, 98SE, and Windows Millennium
- Download w2fix.exe to the desktop.
(Important: w2fix.exe cannot be run from a floppy disk as the
program reboots the computer and a floppy disk would interfere
with the boot sequence.)
Note: If you accidentally downloaded the program to a location other than the Desktop, copy it to the Desktop now
- Double click on the w2fix file on your Desktop and follow
the on-screen instructions. You will be prompted to reboot your
computer twice before the fix is complete.
- You can delete the w2fix.exe file from your computer after the fix is installed.
Tom's Information on Error Codes for the Winsock 2 Fix:
My first suggestion to a W2fix error would be to shut down ALL programs currently running AND remove ANY suspicious programs (spyware etc) from the computer, then try again.
Here are all the non-trivial error messages the program
generates (I might have missed
some, but this is the majority of them.) They share the same basic
format: Action attempted -> Error Code generated.
====
Unable to check for DUN Upgrades. There was an error While opening
the registry key:
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
Error Code:
----
w2fix is trying to open up the uninstall registry key..
nothing should go
wrong with this. The only thing I could imagine is that the key
does not
exist.. which it SHOULD. Or the reg is corrupted.
====
Unable to query information from
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
This could indicate a problem. Please report error code:
----
At this point it is getting the number of keys beneath
the Uninstall
key - again this should not be a problem unless the registry is
corrupt.
====
There has been an error while enumerating keys under
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\n"
This may indicate a problem. Please report error code:
----
Something happened while the program was searching through
the keys underneath
uninstall. Basically it is looking for DUN upgrades that were
installed by
the user. If this or any of the above isnt working, add and remove
programs
probably wont work. Again this shouldn't happen unless the reg
is messed up.
====
Unable to open the key:
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce.
Error code:
----
The program is trying to get itself in the run section
of the registry so
it'll restart at reboot. Again this should work. If it fails here,
you can
let the machine reboot and then try running w2fix again, it should
pick up
where it left off. Again this isn't a good thing to happen.
====
We were unable to write data to the registry key:
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
The errorcode was:
----
There is definitely something wrong here. The program
was able to open
up the registry key, but it couldn't write to it. Not good.
====
Unable to open the key:
HKLM\System\CurrentControlSet\Services
Unable to continue.
----
This is a showstopper. We can't open up the Winsock2's
parent key for whatever
reason. Try going there through the registry.. but again it's
not a good sign.
====
There was an error deleting the winsock2 key.
The error code is as follows:
----
We couldn't delete the winsock2 key. This operation should
go through unless the key
doesn't exist already, or something else is wrong.
=====================================================
Error codes:
#define EPERM 1 //You do not have permission to perform this action
#define ENOENT 2 //The requested object doesn't seem to exist
#define EINTR 4 //The program was interrupted during a critical
operation
#define EIO 5 //An I/O error has occured
#define ENXIO 6 //No such address or device
#define E2BIG 7 //Argument list provided was too long
#define ENOEXEC 8 //Unable to execute process because arg list
was too long
#define EBADF 9 //The file descriptor was invalid.
#define EAGAIN 11 //Try again... resource is busy
#define ENOMEM 12 //Not enough mem to complete the operation
#define EACCES 13 //You dont have the access rights to perform
the op
#define EFAULT 14 //Bad address was given to a function
#define EBUSY 16 //Device was busy, try again
#define EEXIST 17 //The file/object already exists
#define ENODEV 19 //No such device exists
#define ENOTDIR 20 //Not a directory
#define EISDIR 21 //Is a directory
#define EINVAL 22 //Invalid argument
#define ENFILE 23 //Too many open files system wide
#define EMFILE 24 //Too many openfiles process wide
#define ENOTTY 25 //Inappropriate IO operation
#define EFBIG 27 //File too large to operate on
#define ENOSPC 28 //No space left
#define ESPIPE 29 //Illegal seek on a file
#define EDOM 33 //Argument provided beyond a valid domain
#define ERANGE 34 //Arguemen provided was beyond a valid range
#define EDEADLK 36 //DEAD LOCK 2 processes are waiting for the
same resource
//and will never execute.
#define ENOSYS 40 //Subsystem that would process command is not
present

