Try this, note the parts relating to MS-DOS

The information in this article applies to:
Microsoft Windows 95
Microsoft Windows 98
Microsoft Windows 98 Second Edition

This article was previously published under Q139434
SYMPTOMS
When you try to run a Microsoft Visual Basic 3.0 program in Windows, or try to start an MS-DOS session, you may receive the following error message:


A device attached to the system is not functioning

When you click OK, the program or the MS-DOS session may not start.
CAUSE
This error message can occur if either of the following files is damaged or missing:

Vbrun300.dll
Winoa386.mod
RESOLUTION
To resolve this issue, use the appropriate method:

Method 1
If you receive the error message when you try to run a Visual Basic 3.0 program in Windows, reinstall the Vbrun300.dll file. To do so, reinstall the Visual Basic 3.0 program that includes the Vbrun300.dll file on its Setup disks.

Method 2
If you receive the error message when you try to start an MS-DOS session, extract a new copy of the Winoa386.new file from your original Windows disks or CD-ROM to the Windows\System folder, and then rename the Winoa386.new file to Winoa386.mod. To do this, follow these steps:

Extract the Winoa386.new file from your original Windows 95 disks or CD-ROM to the Windows\System folder. The Winoa386.new file is located in the following locations:


The Win95_03.cab cabinet file on the Windows 95 and Windows 95 OEM Service Release 2 (OSR2) CD-ROM.
The Win95_03.cab cabinet file on disk 3 of the original Windows 95 DMF floppy disks.
The Win95_04.cab cabinet file on disk 4 of the original Windows 95 non-DMF floppy disks.
The Win98_45.cab cabinet file on the Windows 98 CD-ROM.
For information about using the Extract tool, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: 129605
TITLE : How to Extract Original Compressed Windows Files

At the command prompt, type the following commands, pressing ENTER after each command:

cd\windows\system
ren winoa386.mod winoa386.old
ren winoa386.new winoa386.mod


Restart your computer.