Troubleshooting and Resource Guide for Windows 95/98/ME/XP/Vista

Free Computer Help Forums
Computer "How To" Articles
Rescue The PC
Maintain The PC
Speed Up The PC
Warp Speed!
Surfing The Net
Tidbits
The Bleeding Edge
Relevant Links
Newsletter Archive
Awards
About Toejumper.net
Home
Web Toejumper.net
 

Rescue The Drowning PC - DOS Tips and Tools

MS-DOS Before Win 9x, you pretty much had to spend money (or download shareware) for utility programs to help you deal with problems. Norton, for one, made tons of money from Microsoft's unwillingness to supply "fix-it" tools with their OS. Windows and DOS 7.0 (the version of DOS powering Windows 9x) partially correct that oversight with the inclusion of the following tools. Some of these have been around for a while, but still...:

  • FDISK.EXE This allows the creation of a new partition sector, allowing you to eliminate boot viruses which infect the partition sector. Don't use this unless you have full backup! Repartitioning a hard drive is not for the faint of heart.

  • SYS.COM Creates a new boot sector and carries the system files to the indicated medium. This can repair an unbootable hard drive. Again, careful!

  • SCANDISK.EXE Checks and corrects the index and file structure of your hard disk, as well as locating physical defects. Do not use older DOS or Win 3.x versions.

  • DEFRAG.EXE Reassembles fragmented files. Do not use older DOS or Win 3.x versions of Defrag.

  • MEM.EXE Checks the memory capacity.

  • MSD.EXE Provides details on the configuration and memory capacity.

  • DEBUG.EXE If you know Assembler language, you can use Debug to address a number of errors and porting problems. Debug is also a quick way to vaporize your program structure; hands off unless you know what you're doing.

Note: Win 98 adds several goodies for maintaining a healthy PC, and Windows Millennium adds a whole section called "PC Health" that is very useful, though not universally popular.

The C:\ prompt that DOS-heads know and love is also called a CLI, or "command line interface." Wooooo. Want one available all the time? Easy enough. Right-click on the Windows Taskbar, select "Toolbars," then "Address." Now, left-click its handlebar, drag it up to your Desktop, and let go. Right-click inside the newly-created box and choose "Always on Top." Resize it as you wish, move it elsewhere, and you're in business. Treat it as you would any other CLI; programs (and URLs) can be launched from this toolbar.

We've mentioned the Start, Run command before, and we will again. Basically, it's a DOS-like way to start a program under Windows. You open the Start menu, click Run, and type in the DOS command in the field. Easy enough. Windows also remembers the last commands typed into the Run field, so by clicking the down arrow to the right of the field, you can just double-click on any of the commands found there to launch that same program. Got a lot of commands in there? Type the first letter of the command you want to enter, and use the up or down cursor key to rotate through the options. Hit Enter to launch your selection.

It's easy enough to open a folder under the MS-DOS prompt. You basically type the same command at the prompt as you would under the Start, Run command in Windows, except you preface the command with the word "start." For example, to open MYFILE.DOC in your DATA folder, just type: START C:\DATA\MYFILE.DOC at the DOS prompt.

Another way to open a particular folder in DOS is to drag-and-drop a folder from a folder window directly onto the DOS prompt. Here's how. Open a DOS Windows (Start > Run > type Command > press Enter). In the DOS window, type "cd" followed by a single character space. Next, open a folder window, and navigate to the folder containing the subfolder you want to open as a DOS directory. Now just drag and drop that subfolder onto the DOS window command line. Click the DOS window anywhere to select it, and press Enter to open the directory in the DOS window. (Note: If you have the folder option to display the current folder path in the Address bar turned on, you can drag and drop the small folder icon from the Address bar instead.)

You can also access Explorer from the DOS prompt. If you type EXPLORER at the prompt, you get a single-paned window with its focus on the current directory. If you'd rather have a two-paned window, type EXPLORER /E at the prompt.

Win ME users running DOS-based programs (mostly games, these days) may have trouble due to ME's refusal to process the AUTOEXEC.BAT and CONFIG.SYS files. Many of these programs require the FILE=xx line found in the CONFIG.SYS parameters, where xx is the number of files available to DOS-based programs. To increase the number of DOS-based files in Millennium, you'll need to modify the SYSTEM.INI file. Open SYSTEM.INI in Notepad, and find the [386Enh] section header. Below the header, locate the line that begins: PerVMFiles= . If you don't find the line, insert it just beneath the section header. The number you insert after the equal sign will be added to the default of 30. So, if your game requires, say, 90 files (a good number to start with), make the line read PerVMFiles=60 . The absolute maximum is 255, so never set the PerVMFiles= line above 225. You can find out more from Microsoft's Knowledge Base at support.microsoft.com/support/kb/
articles/Q269/0/30.asp
. You can also find Article Q274646 using the same basic URL. Both articles will give you more info than the tidbit I've provided.

The Win 98 Resource Kit contains a DOS tool called WHERE that finds a particular file or group of files on a hard disk or LAN. For example, typing "where /r \ *.log" (without the quotes) lists the locations of all files on the current drive with a LOG extension. The tool supports numerous command-line switches. The trick is that you first have to install the Resource Kit: insert your Windows 98 CD, double-click on Setup.exe from the \TOOLS\RESKIT folder, and follow the instructions from there.

By the way, Windows supports long filenames, up to 255 characters, while DOS was stuck with only 8. Still, there are some limitations, particularly on using certain characters. The following are no-nos for file names: /\;:*?"<>| Want to make Explorer show the long MS-DOS filename on the title bar? From inside any Explorer window, select View/Options. Click the "View" tab, select "Display The Full MS-DOS Path In The Title Bar," and click OK. Now, not only does an open window's path appear on the title bar, but it also shows up on the corresponding Taskbar item (whether the window is minimized or not).

You might want to make accessing DOS easier by dragging the MS-DOS prompt from your Programs folder to the Start button so you can open a command window easily.

One of the most useful functions of DOS access is the ability to move around in the directory structure. Many Windows users have forgotten much of what they knew about DOS commands, and worse, Windows has changed some of the command parsing. Here's the simplest commands for moving around in the directory tree, all using the CD or "Change Directory" command:

  • CD .. moves you up one directory level (for example, from C:\WINDOWS\BASEMENT\SUBBASEMENT\CRAWLSPACE to CD\WINDOWS\BASEMENT\SUBBASEMENT)

  • CD ... moves you up two directory levels (and if you keep adding periods, you keep moving up levels)

  • CD\ moves you up to the root directory, no matter how many levels that may be

Ready for something fun? Give yourself an automatic prompt to DOS every time you start your PC. You have to edit the MSDOS.SYS file in your C: directory, but you can handle that. Make sure Windows is showing you all your file extensions (in Explorer, go through View/Options to check this option). Stay in Explorer. Find MSDOS.SYS in your root directory (probably the C: folder). Right-click the file and choose Properties. In the dialog box that appears, uncheck the Read-Only attribute and click OK. (Now's where you're getting into dangerous territory, so follow these directions exactly and don't stop for burritos or Budweisers until you're done.) Choose Start/Run from the bottom of your screen, type NOTEPAD C:\MSDOS.SYS in the box, and press Enter. When the file opens in Notepad, look for the Options heading. If you see a line that starts BOOTMENU= , edit it to read BOOTMENU=1 (if the line isn't there, add it). This forces Windows to show you a menu of options each tine you start your computer. Just press the option you choose. If you're making burritos and leave the choice to Windows, it will pick whichever one is set as the default. To set the default yourself, you need a line like BOOTMENUDEFAULT=1, where the number corresponds with the choices in the Startup menu. 1 sets the default for Windows, 3 makes Windows's Safe mode the default (why you would do this, I don't know), 6 sets the default for MS-DOS, etc. To make Windows give you a different amount of time to select other than the default of 30 seconds, add a line such as BOOTMENUDELAY=10 or whatever number of seconds strikes your fancy. Add the line BOOTDELAY=0 to get to the Startup menu as quickly as possible. Now save the file and exit. The next time you start your PC, prepare to be dazzled, or at least prepare to make a choice.

You can run a DOS program from Windows even if the DOS program requires variable parameters each time it is run. First, create a shortcut for the program. Then right-click on the shortcut and select "Properties." Click on the "Shortcut" tab and add a question mark (?) to the end of the path in the "Target" field. When you run the program from the shortcut, it will open a parameter window where you can type in the variable information it needs.

Miss the old DOSKEY program? It's still there. Have it open automatically when you open a DOS window by right-clicking the MS-DOS icon, choosing Properties, clicking on the Program tab, and on the Batch file line, typing DOSKEY. Close it up and you're good to go.

Want to open your DOS windows in the same directory every time? Right-click the MS-DOS icon and choose Properties. Click the Program tab. On the "Working" line, type the directory you want to open in, and click OK.

Many games are written as DOS applications and not as Windows apps. Sometimes this causes trouble: slow graphics, program hangs, etc. To correct this: Go to My Computer and drill down until you find the proper MS-DOS program. Click File. Select Properties/Program/Advanced. Select the MS-DOS check box. This almost completely removes Windows from memory and allows this DOS application to run much more smoothly. To exit this mode, restart your computer. Some graphics-heavy DOS programs running in full screen mode may suffer from distortions due to the screen saver being enabled. In the same Program menu, select Misc. and then disable the "Allow screen saver" check box. If your DOS-driven programs still act wonky, try setting the program to run in DOS mode if it will let you. The program will run under DOS, and when you exit the program, your computer will re-enter Windows. You can always restart Windows to have your PC come up in MS-DOS mode. A program that tweaks your older video card into running at current VESA standards is available from SciTech, called Display Doctor ($45). It seems most useful as a VESA BIOS upgrade for older chips. What does this mean? If you have an older video card and your latest edition of Quake XVII runs like molasses, this program may help the program run faster and more smoothly.

If you spend a lot of time in MS-DOS mode with DOS-based programs, try this to enhance performance. Edit the PIF file to run SmartDrive's disk cache, not loaded by default in MS-DOS mode. Do this by opening the C:\WINDOWS folder, right-clicking on the Exit to DOS icon, and choosing Properties. (Some DOS programs have their own custom PIF files, and you'll need to do this using its icon.) Click the Advanced button and make sure the MS-DOS mode box is checked. Then check the box labeled Specify a New MS-DOS Configuration and click OK. Click on the Configuration button and, from the four dialog box selections, choose Disk Cache. Click OK. Click OK to close the Advanced Program Settings box and the Properties box that follows. Your programs' performance should improve.

Some DOS programs won't run if you have a Windows screen saver. Wonky, huh? Try this as an endaround: Go into Explorer and right-click on the DOS program's icon. Choose Properties and then click the "Misc" tab. In the dialog box, check the "Allow screen saver" option. Close the dialog box. That should do the trick.

Windows 95 pretty much ate the old DOS we all knew and, er, loved, and subsequent versions all but finished the job. One of the features of DOS 6.x that is missing in DOS 7.0 (the Win 95 version of DOS) is the extensive help menu. If you find yourself in DOS mode and miss the older help features, look in your Windows CD for a directory titled \OTHER\OLDMSDOS (some computers may have this on the Windows Companion CD). Copy these two files, QBASIC.EXE and HELP.COM to C:\WINDOWS\COMMAND. Of course, it's tougher to deal with the third file, HELP.HLP, because it's compressed. To uncompress it, first copy EXPAND.EXE into the WINDOWS\COMMAND directory. Then insert the CD and, at the C: prompt, type this command:
 

EXPAND D:\OTHER\OLDMSDOS\HELP.HL_ C:\WINDOWS\COMMAND\HELP.HLP

This expands, loads, and installs the help data. You can now delete EXPAND.EXE from Windows. Of course, if you have old DOS 6.x diskettes, you can load these files from those diskettes. DOS 7.0 does provide some help functions: type /? behind the command you need help on: for example, EDIT/?. 

Sometimes the DOS screen fills the screen while Windows is still running. To toggle between full and windowed screens, hit Alt+Enter. To display the toolbar, click the MS-DOS icon in the window's upper-left corner and select Toolbar. If you see the Full Screen button (the one with four arrows), click it to enter Full Screen mode.

On the topic of programs, you're generally better off trying to avoid programs not specifically written for Windows. Older programs written for DOS or earlier versions of Windows often run well under Windows, but not always. Particularly avoid Win 3.x antivirus programs, disk utilities, and RAM doublers; these programs will wreak havoc in Windows. Additionally, uninstalling these programs often doesn't work particularly well, with these programs leaving bits of themselves strewn all over your hard drive as well as clogging up your Registry. For programs written specifically for DOS, it may be wise to exit Windows and run the program from the C: prompt.

Windows has an undocumented DOS switch which eliminates the long filename columns in a DOS window directory listing. Type DIR /Z at the C: prompt. Type DIR /B to display the long filenames only, and type DIR /Z/B to display 8.3 (short) names only.

Windows can use longer file names fine, but older applications choke on anything over 8 characters long (hence the BLABLA~1.EEK file names). Don't use long file names with older apps. One easy way to restore long file names that have been truncated is to move them to the Recycle Bin and then restore them. The file names will be restored as well, in most cases. By the way, you can use long filenames at the DOS prompt by typing them in quotation marks: i.e. DIR "MY DOCUMENTS".

Drag-and-drop long DOS filenames instead of typing them. From Explorer, a folder, or the Desktop, drag any file and drop it onto the MS-DOS Prompt window. The path and filename will appear on the command line.

Don't forget about DOS command switches. They're still there, ready to do their jobs. At any DOS command, type /? after the command to find out what switches are available and what they do.

You can paste into the MS-DOS prompt by clicking on Paste (third button from the left on the toolbar). If the toolbar doesn't appear in the MS-DOS Prompt window, right-click on the title bar and select Toolbar.

Copy data from the MS-DOS prompt by right-clicking on the title bar and selecting "Edit/Mark." In the MS-DOS Prompt window, highlight the area you want to copy by holding down the left mouse button and dragging across the data. Press Enter, and you're ready to paste. Another way to do this is to click on the Mark button on the MS-DOS Prompt toolbar, highlight the area you want copied by dragging the cursor, then click on Copy.

To make a DOS app run in the background, click on its toolbar's Background button. Then you can open a second DOS window and execute commands while the first DOS app runs.

Don't like the way DOS type appears on your screen? Set the type size from the DOS prompt by opening the Properties dialog box, clicking on Font, and choosing the desired font dimensions from the scrolling window. You can set different font sizes for different DOS windows if you like.

Microsoft gave us all an old but serviceable little diagnostic program called, originally enough, Microsoft Diagnostics. It's a DOS utility that can provide information other Win-based utilities can't, particularly in diagnosing IRQ conflicts that keep Windows from booting up. Hunt down MSD.EXE in the \OTHER\MSD folder on your Windows CD and copy it to a bootable floppy. You may need it.

Windows 95 improved on Windows 3.1's protection for DOS memory. That is, Windows 95 does a better job of making sure that the memory used by a DOS program isn't invaded by some other memory-hungry program. However, this memory protection is optional. Turn it on by right-clicking the DOS program's shortcut and then clicking the Memory tab. Put a check mark in the Conventional Memory area's Protected box. Then, click Apply or OK, and the memory watchdog is ready to bark. Warning: You should leave this option turned off unless the program has proven itself a crash-crazy fiend when unprotected. Turning memory protection on for all DOS programs can seriously cut into your system performance.

Win 98/ME users have a DOS utility in their Resource Kit called Time This (TIMETHIS.EXE) that informs you just how long it takes to run a DOS command. Find it in the \TOOLS\RESKIT\ folder on your Windows CD and install it using the SETUP.EXE file.

 
 

Copyright © 1998 - 2009
Usage of this site constitutes acceptance of our Terms of Use
Terms of Use