Saturday, May 19, 2007

Cannot Print or Print Preview from IE7 on Vista

Whenever I tried to print or Print Preview with Internet Explorer 7 on Vista I was getting an error message like this:

"Cannot find 'file:///C:/Temp/Low/GAG0N40P.htm'. Make sure the path or Internet address is correct."



followed by another script error message talking about an error in like 2069 in preview.dlg:


Of course, this happens because I changed the TEMP folder on my machine to C:\Temp.

When I try to print or print preview, IE7 creates a subfolder C:\Temp\Low, but this inherits the security settings from the parent folder, and the print fails when IE is not run elevated.

The solution is to open a Command Prompt in elevated mode (Run as Administrator), and in that window to run the following command

icacls C:\Temp\Low /setintegritylevel (OI)(CI)Low

If everything is ok you should get an output like this

processed file: C:\Temp\Low

Successfully processed 1 files; Failed processing 0 files

and after that the Print Preview should work fine.

(Make sure you recreate the Low folder before running the command in case you accidentally deleted the folder)

No comments: