Blog: DOS

While setting up a new Windows 7 computer for a customer, the user had several programs that were very old. There was one program in particular that was written in the 1980s and was a DOS based program. This was a program that was custom written for this company to calculate the dividends for their partners, so no upgrade existed nor did they want to use another process. The program was very simple, click the appropriate DOS program and the report and checks print.

I found that the ports in the printer properties GUI do not correspond to the DOS printers. To print to a printer using DOS, you must use the following command to map the printer: net use port \\server\printer. You can run net use from a command prompt to see what devices are connected via command line. [more]

As you can see in the screenshot below, Printer1 is mapped to LPT2 from the GUI and LPT1 from the command line.

 

The solution for adding the printer so the DOS program could print was to place a batch file in the startup folder with the net use port \\server\printer command so the printer will be mapped each time the computer starts. This resolve this issue and allowed the DOS program to print to the printer on the new Windows 7 PC.


 

I received a machine from a customer that would not boot. The machine had been operating flawlessly for several months… then suddenly it would not boot. The typical error was: “The file is possibly corrupt. The file header checksum does not match the computed checksum. Also, once in a while I got an error from BOOTMGR:.  I ran diagnostics on both of the hard drives (mirrored) in the system from a BIOS diagnostic option and they reported NO errors. [more]

I could not boot from the Windows 7 CD. I could not boot from the recovery CD made from Windows 7. I finally made a bootable USB drive with DOS and it worked. I then saw an option in the BIOS to run a memory test… did it and it failed.

The entire problem (after hours of troubleshooting) was a bad memory stick!


 

Who remembers the DOS days when files could only be 8 characters long with 3 character extensions?  Do you remember when Microsoft introduced long files names in Windows 95?  In order to maintain backward compatibility, the system still created 8.3 files names.  Well every version of Windows still does that, even Windows 7.  This can be disabled for performance reasons by setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem:NtfsDisable8dot3NameCreation=dword:00000001 (http://support.microsoft.com/kb/121007) but you never know when you will need them. [more]

I was running an application that had been installed down under C:\Program Files, and it’s configuration file was there, and I needed to pass that as a parameter to the program.  I tried using quotation marks, backslashes to quote the spaces, backslashes to quote the quotation marks, quotation marks to quote the quotation marks – everything I could think of it and still did not work.  Using the short file name with no spaces worked great.

I had some directories created that were made up of only spaces and I could not delete or rename them.  The Windows Easy Transfer would get stuck in a loop because of these, so I decided I better delete or rename them.  I did a dir/x to find the short names, and then I could access them using that.

If you want to find the “short name” path, just run the good ole’ trusty DOS COMMAND.COM.  It’s still there, even on Windows 7!.  Just enter command at the command prompt and a cd if your prompt does not indicate your path.

One side effect to look out for.  Since the short name is based on the first few characters of the long name, renaming the long name and leaving the first few characters the same will result in the short name staying the same.  So you cannot just rename the file to “long file name with spaces-old.txt” to get it out of the way if something is accessing LONGFI~1.TXT.  Renaming it to .old would work.