Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have recently setup a new print server on a 2008 r2 box. I do not want to use the built in IIS printer page that is available. We already have an intranet site that I want our users to go to for the printer installs.

What I found works on Windows 7 is giving a "The handle is invalid" in Windows XP

I have made a file printer.lnk and placed it in the document root of the intranet server the the target of the .lnk file is \\printserver\printer so on the site i put in

<a href="printer.lnk"><span>Office Printer</span></a>

so in essense when you click on "Office Printer" it prompts you to save or run the file printer.lnk

When I click "Open" in Windows 7 it begins installing the printer normally.

When I click "Run" in Windows XP with Internet Explorer 8 I get an error of "The handle is invalid" If i close the error window and click the link again then click "Run" again it works just fine... I dont wan't that to be the answer to this problem.

Any suggestions or possibly a better all arround solution. I'm a network guy and I am not great at html so please try and keep solutions simple if possible.

share|improve this question

migrated from Jul 28 '11 at 2:25

This question came from our site for professional and enthusiast programmers.

What happens when you right-click on the link and select "Save target as", then start this saved file. Does it work or does it fail also? Is the Win 7 box already on IE9 or is it also using IE8? – Tex Hex Jul 28 '11 at 10:22
Windows 7 is running IE 9. It does work in Windows XP using Firefox(of course), but I am not going to deploy Firefox thorugh out or agency because I can not manage the settings through AD. Yes it does work if you do a save as to the desktop and then run it. I just would prefer a way to make the link work becuase I know I am going to get calls on this if the users have to right-click and save even if I post instructions on the site. – YerPhate Jul 28 '11 at 12:58
Thanks. So "Save target as" + starting the file is working with Firefox, but in IE8 it fails the same way as if you click directly on the link? – Tex Hex Jul 28 '11 at 13:04

Just to recap what we know so far:

  • Windows 7 with IE9: Click works
  • Windows XP with Firefox: Click works
  • Windows XP with IE8: Click does not work (Save Target as and executing it works)

Given this information, I think that IE8 fails at trying to detect what file type a shortcut (*.LNK) is and it is using MIME-sniffing to find out. A long description of this can be found on MSDN.

In short, it means that IE reads the file and tries to guess what type it is and which program is needed to open it.

You could overcome this by adding a MIME type for LNK to the web server, so no MIME-sniffing is needed. See this blog post from Darren McCall for details.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.