• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

Opening an application with a URL

Here's the basic set-up ...

I have doctors who are in the field with tablet computers running Windows XP Pro with IIS installed, IE 6.0 sp2, and MSDE ... while in the field they use a web based application (running locally ... all URLs pointing to localhost.) The application provides them with a list of patients they will be visiting (yep believe it or not - housecalls), details about the visit, and the locations of the patients.

I need for the doctors to be able to click on a link (standard HTML) that points to a local document with an .ActInk extension. The behavior I am looking for is ... the the .ActInk document should spawn the Active Ink application (also local) with the document loaded. This is the same behavior I would expect if the link was to a MS Word document (.doc), which would spawn MS Word with the document loaded. In fact there seem to be several file extensions that are "built-in" to IE's behavior which will spawn the local application (if installed).

I've checked to be sure the .ActInk extension is mapped to the Active Ink application (tools, folder options, etc ...) - Nope
I've tried setting a MIME type "application/x-ActInk" in IIS - Didn't help
I've tried using the FILE protocol in the URL - File://foldername/filename.ActInk - No Joy
I've added the type attribute to the URL - < a type="application/x-ActInk" href="File://foldername/filename.ActInk" > - Nope
I've tried just a standard URL pointing to the .ActInk file using the HTTP protocol ... Nope
I've tried using Windows Scripting (a suggestion I found in another question posted here):

function LaunchApp() {
 if (!document.all) {
  alert ("Available only with Internet Explorer.");
 var ws = new ActiveXObject("WScript.Shell");
 ws.Exec("C:\\Program Files\\Active Ink\\Active Ink Enterprise Designer.exe");

No Joy here either - error message is weird on this one  --"Automation Server Cannot Create Object" -- It's almost like Windows Scripting Engine is not being seen ... hmmmmmm (BTW - installed latest version 5.6 for this test)

I'm guessing there must be some kind of registry entry that would make this work ... but have no idea how to do it or what it might be ...

And finally - here's the gotcha ... the .ActInk file is actually an XML file ... the content of which is read by the Active Ink application to create "inkable" forms on tablet PCs ... no matter what I do when I link to the file IE interprets it as XML and displays a very pretty XML view of the document in the browser window instead of spawning the application and passing it the file.

In case it was not clear above - this is 100% a locally run web application, in an environment where I control the OS, hardware, and assorted software ... I don't really have a security issue to worry about.

Any help, advice is appreciated ...

Chip Dukes

  • 2
1 Solution
Hi cdukes77,

 if the extension is not registered with Explorer, hence you click on the file with that extension and it doesn't run that application it will not run. PDF's are registered to run adobe when you clock on a file with that extension, it has nothing to do with the browser, so you'll need to make sure that the extension is registered in the shell for running the application you want for that extension.

cdukes77Author Commented:
Your suggestion was the first item in the list of things I've already tried (at least I think it is, you've worded it differently) ... but FWIW it was my first thought too.

I think that the tendency to see the document at XML (regardless of extension) is meaningful in some way.

First of all, using scripting to force a link to open an external application is not the right way to go.

As cyberdevil67 said, you need to register the file format to open with the external application... so you get the dialog "save to disk / open with application" with the option to "remember the setting".
And for that to work, you need to serve the document with the correct mime type.

Web servers have usually use the mime type "text/html" by default... that's why your file opens correctly in the browser.
To force the file to open with the external app, you need to use a mime type that is not supported by the browser.
You seem to already know that, since you already tried using the "application/x-ActInk" mime type, but the way you tried it does not work.

You have 2 options to change the mime type to "application/x-ActInk":
1. Edit your web server configuration to associate all files with the "" extension with "application/x-ActInk" (I don't know how to do that in IIS cause i'm an apache guy, but it should be quite easy).
2. Use server-side scripting (PHP/ASP) to change the mime type in the http header (here again, i know how to do that in PHP, but not in ASP).

Note that you can use firefox to check the mime type in "View Page Info" on a right click on the browser.
1. Edit your web server configuration to associate all files with the "" extension ...
should be
1. Edit your web server configuration to associate all files with the ".ActInk" extension ...

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now