Archive for October, 2010

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