RE: My Content-Type Question

Discussion in 'OT Technology' started by SLED, Jan 24, 2004.

  1. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    Ok, so a few weeks back i mentioned that i was developing an app that needs to be opened via a link on a webpage. I just set the content-type of the page to application/x-hst and put the correponding registry values in for that type:

    [HKEY_CLASSES_ROOT\.hst]
    @="hst_file"

    [HKEY_CLASSES_ROOT\hst_file]
    @="My Program"

    [HKEY_CLASSES_ROOT\hst_file\shell]

    [HKEY_CLASSES_ROOT\hst_file\shell\open]

    [HKEY_CLASSES_ROOT\hst_file\shell\open\command]
    @="C:\Path\to\Program.exe\" "%1"

    This works GREAT in windows 2k. Program opens up as expected, and life is good. However, on my XP machines, it seems that IE (and only IE) ALWAYS asks me for an "Open/Save As" confirmation, and the checkbox "Always ask before opening this type of file" is disabled which tells me that a security setting somewhere is prohibiting me to just tell the browser to Open the file. And it's only IE!! MyIE2 is fine, Netscape is fine, and all others seem cool.

    Anybody know anything about this? It's getting pretty frustrating because I really don't want to have my users choose "Open" every single time. help? :hs:
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    nobody? :wtc:
     
  3. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    My experience has been IE is REALLY quirky and will override the content-type with the file's extension (Microsoft figures the web developer is an idiot and figures they must take it upon themselves to figure out the file via the file extension).
     
  4. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    yeah, even with the extension, the checkbox to have it just use "Open" as the default action, is greyed out.
     

Share This Page