Windows: Internet Explorer fails to print with preview.js errors.

October 28, 2010 1 comment

Symptoms:  Attempting to print from Internet Explorer returns the error:

An error has occurred in the script on this page.
Line: 1507  (or whatever)

URL: res://ieframe.dll/preview.js

See attached screen shot:

Other symptoms include, missing menu items, or menu items that don’t do anything when selected.

Cause:  Some other application wrote to the wrong location or un-registered .dll’s that it wasn’t supposed to during install or uninstall.  Which application? Who knows.

Fix:  As described in the references below, you’ll have to re-register the IE libraries and components.   But first:

  1. Ensure that your printer actually works.  Print a test page from Notepad, or Word or whatever.  Printer not working?  The rest of these steps won’t help you.  Fix your printer.
  2. Reset IE to ensure that other add-ons aren’t causing you grief.
    1. Start Internet Explorer
    2. Press the ALT key to bring up the menu.
    3. From the menu select:  Tools -> Internet Options  (this is reachable from the Windows control panel as well)
    4. Tab:  Advanced
    5. Press the button:  Reset…
    6. Press the button: Reset
    7. Restart IE
    8. Attempt to print from IE.  Does printing work now?  If yes, you’re done.  If not, continue.
  3. Re-register your IE libraries.  In the references below, you can do it the Microsoft way and make your own script or use the ready made script from iefaq.  I used the ready made script after reviewing it.
    1. From iefaq listed in the references section, download the script that matches your machine type.  I’m running Windows 7 32-bit so I downloaded
    2. Start the Windows File Explorer.  Start -> All Programs -> Accessories -> Windows Explorer
    3. Find the file that you downloaded.  Computer -> Your disk (C:) -> Temp   (or wherever you downloaded the files to.)
    4. Right click on the .zip file you downloaded and select Extract…
    5. Extract the files somewhere reasonable.  Example: c:\temp\ie_fix\
    6. Find the extracted files.  Navigate down the directories until you find the .cmd file.  In my case the file I wanted was ie-rereg.cmd
    7. (Optional) Open the .cmd file in Notepad to see what it’s going to do.  We’re all curious right?
    8. Right click on the .cmd file and select: Run as administrator.  (No, Run as administrator?  Select Open instead… and consider updating your OS one day.)
    9. The command file will run for a moment and then report an error at the end.  Something about failing to update the registry.  Doesn’t matter, that’s a Windows XP fix that is only necessary if you’re running XP.
    10. Reboot your computer.
    11. Start IE and attempt to print.  Fixed?  Worked for me.


Categories: System Admin, Windows

RFC 1925 – The Twelve Networking Truths

September 23, 2010 Comments off

A classic, from April 1996, RFC 1925 – The Twelve Networking Truths.

My favorites:

   (5)  It is always possible to aglutenate multiple separate problems
        into a single complex interdependent solution. In most cases
        this is a bad idea.


   (12) In protocol design, perfection has been reached not when there
        is nothing left to add, but when there is nothing left to take



Categories: Programming

Windows – Loading a 64-bit crash .dmp for a 32-bit application

September 20, 2010 Comments off

If a crash dump shows WOW64 CPU emulation in all threads (e.g.  wow64cpu.dll!CpuSysCallStub() …) then a 64-bit dump has been generated for a 32-bit process.

To view the stack the wow 64-bit extensions need to be loaded first into Windbg:

In Windbg:

0:000> .load wow64exts
0:000> .effmach x86
Effective machine: x86 compatible (x86)
0:000:x86> !analyze -v


Categories: Programming, Windows

Taking apart the Energizer Trojan

March 30, 2010 Comments off

A fascinating article on the disassembly of the Energizer Trojan.

Categories: Uncategorized

Manually selecting a default gateway

March 29, 2010 Comments off

Do you have two or more Ethernet adapters in your machine and find that the wrong one is being selected when routing to the Internet or elsewhere?

When using multiple Ethernet adapters, with default IP gateway’s defined for each adapter, the OS may choose a default route that you don’t wish to use. 

A quick fix for this is to ensure that only one adapter has a Default gateway defined.  However; if modifying the default gateway definitions isn’t possible, you’ll need to adjust the metric that is associated with the adapter that you wish to use.


To view the current routes in use, from the Windows cmd prompt:

> route print

To assign a manual metric for your preferred adapter:


  1. Control Panel –> Network and Internet –> Network and Sharing Center –> Manage network connections.
  2. Right click on the adapter to adjust and select Properties.
  3. Click on Internet Protocol Version 4 (TCP/IPv4) and select Properties button.
  4. Click the Advanced button.
  5. Un-check the “Automatic metric” check box and enter a new Interface metric value.  Lower metric values are given preference.
  6. Press OK.

Linux (Debian/Ubuntu)

To view the current routines in use and to list the metric for each available adapter, from a Linux command shell:

$ route
$ ifconfig

To assign a manual metric for your preferred adapter:

  1. Edit /etc/network/interfaces
  2. Add a metric definition for your preferred network adapter.
  3. See man interfaces for more info.


Categories: Uncategorized

List the UDP Ports that are open per application

March 17, 2010 Comments off


> netstat –a –o


# netstat –a -p

Categories: Uncategorized


March 1, 2010 Comments off

Back in April 2008, Raymond briefly covered the book Systemantics: How Systems Work and Especially How They Fail.

… Le Chatelier’s Principle for complex systems ("Every complex system resists its proper functioning") and the Fundamental Failure-Mode Theorem ("Every complex system is operating in an error mode").


Categories: Uncategorized