WinSock for Windows 95 (updated 30th August, '98)

An Introduction.

This page is provided for those of you who don't get weak at the knees when it comes to fiddling around with the guts of Windows 95. A few colleagues have had problems using some Windows 95 games over the Internet - connections failing, Windows crashing, but more often than not fatal exceptions in one VxD (virtual device driver) or another.

A little bit of twiddling, a few files thrown around here and there and - hey presto - no more crashing PC. It turned out that the game connections were much more stable when I upgraded the Dial-Up Networking and TCP/IP subsystems on the PC. Consequently I decided to bite the bullet and post the system updates published by Microsoft on GWeb in the hope that they'll help other users.

As usual, the information I'm providing here is the result of my own work, and I won't recommend anything that hasn't worked for me. There are a few things to watch out for during these changes, but I'll mention them as I go along. All the links on this page will open inside the GWeb pages, so you can easily flip between them and this page.

The second main update to this page (30th August '98) covered the changes to Dialup Networking (the upgrade to version 1.3). This versions includes all the changes to Dialup Networking from versions up to 1.2b, and works with both the original Winsock and Winsock 2. The upgrade also installs the latest TCP/IP stack, which supercedes all the vtcpup and vipup updates previously posted on this page.

The first main update to this page (9th August '98) covered the changes to WinSock2 - it was reposted by Microsoft, and no longer a beta product. If you've already installed the beta version, you'll need to uninstall it (using the WS2BAKUP batch file(s) described below) before installing the current version.

Just in case you used the original GWeb Winsock page to update your TCP/IP stack, and you want to check out that information, I've left a copy of the old page here. I've no idea why you'd want it, but then that's not what I'm here for, is it ?

Where this stuff comes from.

The new Dialup Networking (version 1.3) is from the Windows 95 Updates and Utilities page. WinSock 2 can be found on the Windows 95 Windows Sockets 2 Update page. (A note to developers - check out this FTP directory for Winsock 2 API definitions etc.)

A Word of Warning.

All the information and advice on this page assumes that you're using the standard Microsoft implementation of WinSock - if you've installed anything that replaces WinSock with it's own version (perhaps a custom dialler like AOL), leave this lot well alone. The same applies for applications that hook in to WinSock - it's probably best to uninstall such applications, upgrade the DUN, and then reinstall the hooking application. If any of this sounds iffy to you, you're probably best off leaving your system as it is.

I'm also assuming that you don't go around removing files and directories from your Windows directory ... what d'you mean you didn't think it did anything ? DOH !

Dial-Up Networking.

OK, that's the disclaimers out of the way ... onto business. The first thing you'll want to do is upgrade to version 1.3 of Microsoft Dial-Up Networking (aka MS-DUN). One word of caution - be sure to make copies of any scripts you might be using to get into your accounts - you may lose them during the upgrade to v1.3.

The installation process is simple - just run the downloaded file, and Windows 95 will update each part of your system (DUN, TCP/IP and the Virtual Private Networking) with a couple of system restarts. You may well get asked about a couple of files that already exist on your system as you install - always keep the newer version if you're asked. One important note - you'll need your Windows 95 CD to complete the process...

Microsoft Dial-Up Networking

File Date Description Info Size
msdun13.exe 18.08.98 Microsoft Dial-Up Networking 1.3 (local copy). Release Notes 2,301Kb

Microsoft's Winsock 2

Now for the meaty bit ... the new Winsock. The file below is the Setup program for Winsock 2, as posted by Microsoft. Check out the Info link (the release notes for Winsock 2) if you want to read more about it. Note that when you run the program, there's no 'Are you sure you want to install ...?' confirmation dialog - it'll just go right ahead. Once it's installed, restart Windows 95 to let the installation kick in.

An important note ... during the installation, W95ws2setup will create a new subdirectory 'WS2BAKUP' in Windows. Do not remove it - it has all the files you'll need if you want to go back to Winsock 1. Careful, now !

WinSock 2

File Date Description Info Size
W95ws2setup.exe 20.03.98 WinSock 2 Setup for Windows 95 version 2 (local copy). Release Notes 964Kb

Removing Microsoft's Winsock 2

In other words, how to go back to Winsock 1 if Winsock2's not for you. This is important. Even if you just download the files and think about installing them later, copy this part of the page and keep it safe. If things go pear-shaped, you won't be able to get back online to read this part of the page !

Basically, all Microsoft supplies for you to uninstall is a simple batch file ws2bakup.bat, in the WS2BAKUP subdirectory under Windows. Unfortunately, this batch file cannot work completey successfully, whether you run it under DOS or Windows. My version of the file (Windows is in C:\WINDOWS on my PC) is as follows -

REM This is the Winsock2 backup batch file,
REM created 08/09/1998 09:44:24.
REM Run this batch file to restore the Winsock files
REM that existed prior to running Winsock2 setup.
attrib -r C:\WINDOWS\SYSTEM\msafd.dll
del C:\WINDOWS\SYSTEM\msafd.dll
attrib -r C:\WINDOWS\SYSTEM\wsock2.vxd
del C:\WINDOWS\SYSTEM\wsock2.vxd
attrib -r C:\WINDOWS\SYSTEM\afvxd.vxd
copy C:\WINDOWS\ws2bakup\afvxd.vxd C:\WINDOWS\SYSTEM\afvxd.vxd
attrib -r C:\WINDOWS\SYSTEM\wshtcp.vxd
copy C:\WINDOWS\ws2bakup\wshtcp.vxd C:\WINDOWS\SYSTEM\wshtcp.vxd
attrib -r C:\WINDOWS\SYSTEM\vtdi.386
copy C:\WINDOWS\ws2bakup\vtdi.386 C:\WINDOWS\SYSTEM\vtdi.386
attrib -r C:\WINDOWS\SYSTEM\vtcp.386
copy C:\WINDOWS\ws2bakup\vtcp.386 C:\WINDOWS\SYSTEM\vtcp.386
attrib -r C:\WINDOWS\SYSTEM\vip.386
copy C:\WINDOWS\ws2bakup\vip.386 C:\WINDOWS\SYSTEM\vip.386
attrib -r C:\WINDOWS\SYSTEM\vudp.386
del C:\WINDOWS\SYSTEM\vudp.386
attrib -r C:\WINDOWS\SYSTEM\vdhcp.386
copy C:\WINDOWS\ws2bakup\vdhcp.386 C:\WINDOWS\SYSTEM\vdhcp.386
attrib -r C:\WINDOWS\SYSTEM\vnbt.386
copy C:\WINDOWS\ws2bakup\vnbt.386 C:\WINDOWS\SYSTEM\vnbt.386
attrib -r C:\WINDOWS\SYSTEM\icmp.dll
copy C:\WINDOWS\ws2bakup\icmp.dll C:\WINDOWS\SYSTEM\icmp.dll
attrib -r C:\WINDOWS\SYSTEM\mstcp.dll
copy C:\WINDOWS\ws2bakup\mstcp.dll C:\WINDOWS\SYSTEM\mstcp.dll
attrib -r C:\WINDOWS\inetmib1.dll
copy C:\WINDOWS\ws2bakup\inetmib1.dll C:\WINDOWS\inetmib1.dll
attrib -r C:\WINDOWS\snmpapi.dll
del C:\WINDOWS\snmpapi.dll
attrib -r C:\WINDOWS\arp.exe
copy C:\WINDOWS\ws2bakup\arp.exe C:\WINDOWS\arp.exe
attrib -r C:\WINDOWS\ftp.exe
copy C:\WINDOWS\ws2bakup\ftp.exe C:\WINDOWS\ftp.exe
attrib -r C:\WINDOWS\netstat.exe
copy C:\WINDOWS\ws2bakup\netstat.exe C:\WINDOWS\netstat.exe
attrib -r C:\WINDOWS\nbtstat.exe
copy C:\WINDOWS\ws2bakup\nbtstat.exe C:\WINDOWS\nbtstat.exe
attrib -r C:\WINDOWS\ping.exe
copy C:\WINDOWS\ws2bakup\ping.exe C:\WINDOWS\ping.exe
attrib -r C:\WINDOWS\route.exe
copy C:\WINDOWS\ws2bakup\route.exe C:\WINDOWS\route.exe
attrib -r C:\WINDOWS\snmp.exe
del C:\WINDOWS\snmp.exe
attrib -r C:\WINDOWS\telnet.exe
copy C:\WINDOWS\ws2bakup\telnet.exe C:\WINDOWS\telnet.exe
attrib -r C:\WINDOWS\telnet.hlp
copy C:\WINDOWS\ws2bakup\telnet.hlp C:\WINDOWS\telnet.hlp
attrib -r C:\WINDOWS\tracert.exe
copy C:\WINDOWS\ws2bakup\tracert.exe C:\WINDOWS\tracert.exe
attrib -r C:\WINDOWS\winipcfg.exe
copy C:\WINDOWS\ws2bakup\winipcfg.exe C:\WINDOWS\winipcfg.exe
attrib -r C:\WINDOWS\system\mswsosp.dll
del C:\WINDOWS\system\mswsosp.dll
attrib -r C:\WINDOWS\system\wsock.vxd
copy C:\WINDOWS\ws2bakup\wsock.vxd C:\WINDOWS\system\wsock.vxd
attrib -r C:\WINDOWS\system\rnr20.dll
del C:\WINDOWS\system\rnr20.dll
attrib -r C:\WINDOWS\system\wsock32.dll
copy C:\WINDOWS\ws2bakup\wsock32.dll C:\WINDOWS\system\wsock32.dll
attrib -r C:\WINDOWS\system\ws2thk.dll
del C:\WINDOWS\system\ws2thk.dll
attrib -r C:\WINDOWS\system\ws2_32.dll
del C:\WINDOWS\system\ws2_32.dll
attrib -r C:\WINDOWS\system\ws2help.dll
del C:\WINDOWS\system\ws2help.dll
attrib -r C:\WINDOWS\system\wsasrv.exe
copy C:\WINDOWS\ws2bakup\wsasrv.exe C:\WINDOWS\system\wsasrv.exe
attrib -r C:\WINDOWS\system\mswsock.dll
del C:\WINDOWS\system\mswsock.dll
attrib -r C:\WINDOWS\system\ndis.vxd
copy C:\WINDOWS\ws2bakup\ndis.vxd C:\WINDOWS\system\ndis.vxd
attrib -r C:\WINDOWS\system\msvcrt.dll
copy C:\WINDOWS\ws2bakup\msvcrt.dll C:\WINDOWS\system\msvcrt.dll
attrib -r C:\WINDOWS\sysbckup\winsock.dll
copy C:\WINDOWS\ws2bakup\winsock.bkp C:\WINDOWS\sysbckup\winsock.dll
attrib -r C:\WINDOWS\winsock.dll
copy C:\WINDOWS\ws2bakup\winsock.dll C:\WINDOWS\winsock.dll
delw2reg.exe addafvxd

That may look like a load of toss, but in principle it's OK. The problem is this - if you're running Windows, most of the files are flagged as 'in use' or 'shared', so most of the commands will fail, leaving you in a right mess. The last command, delw2reg, returns your System Registry to Winsock 1 - but half the system's files are messed up or missing, due to the failure of the ATTRIBs, DELs and COPYs before. DOH!

OK, I hear you say, so why not just run it in DOS ? Because delw2reg won't run in DOS, that's why. So - the solution is to run the batch file in two stages - or rather, to seperate the file into two parts and run one in DOS, the other in Windows. This procedure worked for me...

As I said, this procedure worked fine for me. Double-check everything while you're doing this - it's your Dialup Networking that's at stake here....

On the PC which I sorted out where WS2BAKUP.BAT was run under Windows, I basically went through the commands in that batch file one by one, under a true DOS prompt, to get it back to normal. I'll say it once again - if you're not happy dealing with Windows and DOS at this level, you're probably better off leaving Winsock 2 alone ...

These are the full warnings from Microsoft, posted within their Release Notes:

  • CAUTION: When you run WS2BAKUP.BAT from inside Windows 95, you may encounter a sharing violation as some system files may not be restored if the newer version is currently running! If this happens, you will need to re-run WSBAKUP.BAT in MS-DOS´┐Ż mode. To do this click "Start", "Shut Down", select the "Restart the computer in MS-DOS mode" option, and click "OK". After reboot you will need to type "C:\WINDOWS\WS2BAKUP\WS2BAKUP" and hit the Enter key. (In MS-DOS mode you will see errors for programs that cannot run outside of Windows, but you should not be concerned, as these programs will have already executed properly if you ran WS2BAKUP.BAT from inside Windows 95 first.) Reboot again and you will be back on WinSock 1.1.
  • Note that if you are reinstalling WS2SETUP over a previous version of Winsock2 greater than beta 2, your prior configuration will NOT be backed up again. Uninstalling will yield your original 1.1 configuration, NOT beta 2 or 2a.
  • DO NOT restore by re-installing TCP/IP from the Network applet in the Control Panel! This action will NOT replace the WinSock DLLs, and does not guarantee you will have the same configuration you had before upgrading to Winsock2.

  • That's all folks ! Good luck, and happy online gaming !