(updated 12/16/2012)

Debugging tools and techniques

MSCONFIG.EXE...

In computers using Windows 95 and Windows 98, you can START > RUN > MSCONFIG to see and control what programs start when the computer starts, and what parameters these programs are using. This is a useful debugging tool for identifying startup errors and for managing older software that does not use the "Add and Remove Programs" routine when installing and uninstalling.

This program was dropped in Windows 2000 and Windows XP, but it still can be used if you have the EXE.

To get MSCONFIG.EXE click here...

STARTUP.CPL...

Mike Lin wrote a Control Panel add-on called Startup Control Panel. This small program installs itself as an icon in your Control Panel. When running, you can see and control which programs "start up" when your computer starts.

(Interestingly, any CPL type file appears as an icon in Control Panel. But these executables can also be placed in other locations so they can be run without opening the Control Panel. How useful this is would depend on the application.)

REGEDIT...

This utility gives you access to the Registry - Windows record of where program components are on your PC, what these components can and will do. A corrupt registry can cause your PC to run incorrectly or erratically.

Click on Start > Run and enter REGEDIT to run this program.

The Command Prompt...

The command prompt is a low-level access point to your system in which you can run some direct tests and receive some immediate test results.

To get to the command prompt, click on Start > Run and enter CMD to open a DOS window.

What you can do...

The command prompt, or DOS prompt as it was called in earlier times, permits the user to enter in a number of useful commands (that have never really changed) - like...

Each command has its own "parameters" - additional parts of the command that may be entered to control or enhance the output. For example, DIR reveals the files in a directory. If there are too many files though, the file list will run off the bottom of the screen, causing the top of the list to scroll off the top. DIR /W shows the same files in columns, without details, permitting many more files to be seen on-screen at one time. DIR /P stops the scrolling altogether, revealing only as many files as can be seen on-screen at one time. The command is "DIR", the parameter is "/W" or "/P". to find out what parameters a command has, try the command with "/?".

For a description as to how to use these basic commands, look here...

SCANREG...

(With info from Microsoft article 183887.)

For Windows 98 and Windows ME users only...

"When you start your computer successfully, the Windows Registry Checker tool (Scanreg.exe) creates a backup of system files and registry configuration information (including user account information, protocol bindings, software program settings, and user preferences) once daily. Files that Windows Registry Checker backs up include System.dat, User.dat, System.ini, and Win.ini.

Windows Registry Checker automatically scans the system registry for invalid entries and empty data blocks when it is started. If invalid registry entries are detected, Windows Registry Checker automatically restores a previous day's backup.

If no backups are available, Windows Registry Checker tries to make repairs to the registry."

This program can be useful if you are able to get to a command prompt on startup and wish to put the PC back where it was - using a previous successfully-loaded registry. Boot the PC to the command prompt (using a system floppy or CD). Enter scanreg /? to see the available parameters. Enter scanreg /restore to choose from the available registries. Follow the on-screen instructions and reboot the PC.

PROGMAN...

In Windows, there are two large components known as the "kernel" and the "shell". In General terms, the kernel is comprised of the essential low-level workings of the operating system, while the shell is what you see when running Windows. Explorer.exe is typically specified as the shell, the environment in which user activities take place. This specification is made in the system.ini file in the Windows folder on a PC.

In instances where explorer.exe errors or other errors are occuring on booting, making it impossible to make corrections in normal or safe mode, it may be useful to change this shell to progman.exe and make the changes required within that shell instead.

Progman.exe (program manager) seems to be able to run any executable program. A program run in this way will work like, and look like, it usually does, but will essentially be running in an exclusionary environment - one program at a time. Programs that it may be useful to run, in terms of restoring a PC to working order, would be iexplorer.exe (Internet Explorer, giving access to the Internet to gain info or download a file), winfile.exe (which is the old file manager of Windows 3.1x) or any of the Control Panel (.cpl) programs - like Display Properties (desk.cpl). (To discover which .cpl file does what, you can double-click them on a working PC and they will open.) You may also have other utilities, or there may be other utilities you may learn about, that could help you put your system back on its feet.

Now, it does take some DOS command manoeuvering to accomplish some of this, so if you are unfamiliar with DOS commands you can read about them in this article first. Essentially you will need to know how to change directories so you can get at the files you need to run and edit. You will also need a working knowledge of edit.com, Microsoft's text editor. Both progman.exe and edit.com can be run in the Windows environment of any working PC, so to learn how to use them you can run either or both to see what they will do. These files will be located in the \Windows, or \Windows\Command, or \Windows\System, or \Windows\System32 folder on a PC.

Here is an example...

Problem : After an attempted upgrade of Internet Explorer on a PC, Windows would fail to get beyond an error with explorer.exe when booting. Without explorer.exe loaded as the shell, nothing could be done in Windows to remedy this. Windows would not start in either normal or safe mode.

Solution : after booting to the command prompt, edit.com was used to change the shell= line in system.ini on this PC. The command was changed from shell=explorer.exe to shell=progman.exe. On rebooting, Windows successfully loaded all drivers and started progman.exe in place of explorer.exe. The file ie6setup.exe was "browsed" to (it existed in the c:\program files\internet explorer folder) and was executed. It came up as usual, and after the routine prompts were responded to, it went off to the Internet, downloaded the files it wanted and proceeded to reinstall the product. After rebooting to progman.exe (allowing the update to complete), edit.com was used to re-edit system.ini to restore explorer.exe as the shell. One final reboot set everything right.

As a side issue, it is conceivable that a given PC could be setup to use winword.exe or excel.exe as the shell, in which case the PC would essentially be limited to running one program exclusively. This may be helpful in an environment where users are not knowledgable outside of operating a given program and may cause harm to a PC, or in the "kiosk" or "store" environment where users can operate a single program like a game or demonstration without being able to get to the operating system below it.

IPCONFIG...

For Internet purposes, try this command. Entering IPCONFIG alone will reveal what your IP Address, Subnet Mask and Gateway are.

Other common parameters for its use are : IPCONFIG /ALL, /RENEW, and /RELEASE. To see a good explanation of the many parameters for IPCONFIG, try here...

Click on Start > Run and enter IPCONFIG to run this program.

TRACERT...

TRACERT (trace route) can be used to determine what the Internet transmission steps are between a user and a desired website, and how long each step takes. A URL or an IP address can be used. In a quick test (tracert www.google.ca), it took 15 steps to get from this user to www.google.ca, with no more than 40 ms (milliseconds) for each step.

Problems with sites "timing out" may be debugged using this tool.

Click on Start > Run and enter TRACERT to run this program.

REGSVR32...

This Windows program can unregister problem DLLs so they do not start when Windows does. In the case of trying to remove viruses, adware, spyware, or trojans this can be quite helpful.

Run CMD to get to the command prompt (see above) and use a command line like this to unregister a DLL or other file.

c:\windows\system\regsvr32 /u suchandsuch.dll

To see other options try regsvr32 /?.

Screen Test Images...

These simple images can be used to test a computer monitor for its ability to show the principal colours used in computer displays.

The red, green and blue are the only colours a monitor uses to create all other colours. There is also a white, a grey (50%), and a black image. While small in appearance here, these images are actually 1500 x 1200 pixels in size. If opened full screen, a monitor's ability to show these colours will be apparent. With LCD monitors, any bad pixels will show up when tested this way.

In Internet Explorer, right-click on any of these images and choose Set As Background. Minimize all windows, and the Desktop should be the colour you chose. The Tool Bar can be temporarily hidden to detect problems in that area, and icons can be moved if the Desktop setting is temporarily changed from auto-arranging. Getting your original background back can be done through Start > Settings > Control Panel > Display Settings > Background.

Another tool for screen-testing is Nokia's monitor test utility. This program can be used to test both CRTs and LCD monitors.

DNS lookups and other tools...

Visit DNSstuff.com.

As of 04/04/06, Sympatico's working DNS numbers are 207.236.176.12 and 206.47.244.91.

If these should change, try doing a Google search on a PC that can get to the Internet for "Sympatico DNS" to get newer ones.

Create a new SID for a PC...

This utility can change the security I.D. of a PC after the drive has been cloned, expediting the task of rolling out similar machines.

Visit NewSID's website...


© Products of Concord North Ltd. Home