## LaTeX forum ⇒ General ⇒ hyperref | 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

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

\documentclass[a4paper,11pt]{article}\usepackage{hyperref} \begin{document}\href{run:C:/Program Files/AMPS Batch Allocation/AmpsBatchAllocation.exe}{Run}\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
The following will try to open the actual file:
\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
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.

kaiserkarl13
Posts: 652
Joined: Tue Mar 25, 2008 5:02 pm
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.