These instructions will allow you to run Qbasic/Quickbasic or any other dos-based programs in a Virtual PC on Windows 7.
1. Download and install Microsoft Virtual PC 2007.
http://www.microsoft.com/downloads/deta ... laylang=en
**If you get a message like "This program has been blocked due to compatibility issues." when you try to run MS VPC 2007, see the Supplemental Note below to resolve the issue.
2. Download and install DAEMON Tools Lite if you don't already have a program to mount virtual CD/DVD images.
**If you get the following error when you try to run DAEMON Tools Lite in Windows 7, see the Supplemental Note below to resolve the issue:
"This program requires at least Windows 2000 with SPTD..."
3. Download ISO of MS-DOS 7.10.
Download the zip. Unzip the ISO file and mount it using Daemon tools. (Refer to the online documentation for Daemon tools if necessary.)
4. Download DOS Virtual Machine Additions.vfd
Save the virtual floppy disk file in a location where it can be retrieved later. (This disk contains tools for MS-DOS running in a virtual machine. Specifically, fshare.exe which will be used to allow access to folders on the host machine from MS-DOS running in the virtual.)
5. Create new Virtual Machine image for MS-DOS
- Start Virtual PC Console
Select "Create a virtual machine" and click "Next"
Name the new virtual machine (I named mine "MS-DOS 7.1") and click "Next"
Choose "OS/2" from the Operating system drop-down list and click "Next"
Select "Using the recommended RAM" and click "Next"
Select "A new virtual hard disk" and click "Next"
Optionally reduce the size of the hard disk before continuing. Click "Next"
6. Install MS-DOS on the virtual machine
- Select the new virtual machine and click "Start" (Make sure you've already mounted the MS-DOS ISO CD in Daemon Tools Lite or similar program.)
Click on the "CD" menu and click "Use Physical Drive ..." choosing the mounted virtual drive with MS-DOS CD
Click on the "Action" menu and click "Reset" to reboot the virtual
Type "1" and follow the instructions to complete the installation of MS-DOS. (It will be necessary to allow the install program to create a FAT partition, which will require rebooting and choosing the "1" option a second time to install MS-DOS.)
Once the install is complete, click on the "CD" menu and click "Release Physical Drive ..."
7. Install MS-DOS Virtual Machine Additions
- Click on the "Floppy" menu and click "Capture Floppy Disk Image..."
Navigate to and select the "DOS Virtual Machine Additions.vfd" file and click "Open"
At the DOS prompt, type "A:" and hit Enter
Type "DOSADD.BAT" and hit Enter
Click on the "Floppy" menu and click "Release..."
Click on the "Action" menu and click "Reset"
8. Create a shared folder for the virtual machine.
- Click the "Edit" menu and click "Settings..."
Select the "Shared Folders" option and click the "Share Folder..." button
Choose a folder on your computer to share with the virtual MS-DOS machine for transferring files and select a letter ("Z" is default) from the "Drive letter" drop-down list
Check the "Share every time" checkbox and click "OK"
Click "OK" to return to the virtual MS-DOS machine where you can now access the "Z" drive (or whatever letter you assigned) to copy files into the virtual machine from your computer.
9. Run QBasic and/or copy additional files as necessary.
QBasic is included with MS-DOS 7, so you can just start using QBasic or you can copy the QuickBasic files if you have them from your computer using the shared folder drive you just created. You can also copy your QBasic programs and files for use in the MS-DOS virtual machine using your shared folder drive.
**If the Tab and/or Esc keys stop working, see the Supplemental Note below to resolve the issue.
**Fixing Issues with Microsoft Virtual PC 2007 in Windows 7**
The compatibility message when trying to run MSVPC 2007 can indicate that Windows Virtual PC is installed which conflicts with MSVPC 2007. If this is the case, either use Windows Virtual PC (which I haven't tested because my machine does not have hardware virtualization capabilities) or uninstall Windows Virtual PC using the following instructions.
http://blogs.msdn.com/b/virtual_pc_guy/ ... ows-7.aspx
**Fixing Daemon Tools in Windows 7**
The SPTD error can be fixed by following the instructions on the following webpage.
http://geekswithblogs.net/apopovsky/arc ... ows-7.aspx
On my machine, I had to follow all of the steps including removing the all references to the SPTD service from the registry before I could successfully install the latest version of SPTD and then install Daemon Tools.
**Fixing Tab and Escape Key issues in Virtual PC**
The Tab and Esc keys not working in the MS-DOS virtual machine can be corrected by following the instructions from the following webpage.
http://www.aspdeveloper.net/Virtual_PC/ ... al_PC.aspx
If you are running into this issue on Vista and Windows 7 you can get the TAB key back by creating a software allow policy. Go to administrative tools, local security policy, Software Restriction Policies, Additional Rules. Create a new rule for %appdata%\microsoft\vritual pc\vpckeyboard.dll and set it to Unrestricted. Restart Virtual PC.
If the variable doesn't work, try using an explicit path i.e. c:\users\username\appdata\roaming\microsoft\virtualpc\vpckeyboard.dll