LaTeX forum ⇒ Generalhyperref | Start Windows Application

LaTeX specific issues not fitting into one of the other forums of this category.
psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

hyperref | Start Windows Application

Postby psionman » Fri Jan 06, 2012 4:22 pm

I'm want to allow my users to click on a link and run a windows (7) application. My code is:

  1. \documentclass[a4paper,11pt]{article}
  2. \usepackage{hyperref}
  3.  
  4. \begin{document}
  5. \href{run:C:/Program Files/AMPS Batch Allocation/AmpsBatchAllocation.exe}{Run}
  6. \end{document}


The cursor recognises the hyperlink but clicking does nothing.

Is it possible to do this in LaTeX?

kaiserkarl13
Posts: 652
Joined: Tue Mar 25, 2008 5:02 pm

Postby kaiserkarl13 » Fri Jan 06, 2012 10:19 pm

The following will try to open the actual file:
  1. \href{file:///C:/Program Files/AMPS Batch Allocation/AmpsBatchAllocation.exe}{Run}

That fails on my system (UNIX-based), since no application is registered to handle executables. It may work on Windows, though; I just have no way of checking. If not, it may be disabled for security reasons---I can easily see that technique as a way of spreading malicious software, for example.

psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

Postby psionman » Mon Jan 09, 2012 2:42 pm

Thanks Kaiserkarl. I understand the security concern, but that is for the system administrator to sort out. It would seem strange if the writers of the hyperref package have taken on the role of deciding who can do what.

I can do this in M$ word, and much as I hate to, I think the document will need to be re-written in that package. :cry:

kaiserkarl13
Posts: 652
Joined: Tue Mar 25, 2008 5:02 pm

Postby kaiserkarl13 » Sun Jan 22, 2012 6:07 am

The writers of hyperref most likely didn't do anything; I was thinking the PDF format itself might have disabled that sort of link for security reasons.

If it doesn't work, perhaps it's because hyperref itself doesn't know about the "run:" protocol (which may be MS-Word specific). To test that, you could try putting the same link in an HTML document. I suspect that won't work either.


Return to “General”

Who is online

Users browsing this forum: Google [Bot] and 5 guests