Opening an application with a URL

Posted on 2005-04-28
Last Modified: 2008-02-01
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

Question by:cdukes77
    LVL 9

    Expert Comment

    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.


    Author Comment

    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.

    LVL 30

    Expert Comment

    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.
    LVL 30

    Accepted Solution

    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 ...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
    Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
    Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now