none
Alternative to hta application script

    Question

  • Hey guys

    I use the following code to launch a menu of hyperlinks that open a series of Word templates.  It has worked fine until IE10 recently stopped supporting hta applications.

    Does anyone have an alternative way of achieving the same thing but not with an .hta extension?

    <HTML>
    <HEAD>
    <TITLE>My Files</TITLE>
    <HTA:APPLICATION ID="oMyApp"
        BORDER="thin"
        INNERBORDER="no"
        SCROLL="no"
        CAPTION="yes"
        SHOWINTASKBAR="yes"
        SINGLEINSTANCE="yes"
        SYSMENU="yes"
        WINDOWSTATE="maximize">
    <STYLE> body {margin:0} </STYLE>
    </head>

    <body topmargin="2">
    <BODY>
    <IFRAME src="Launch_File_Directory.htm" application=yes width="100%"
        height="100%" marginwidth=1 marginheight=5
        frameborder=0 name="My_File_directory">Iframes not supported</IFRAME>
    </BODY>
    </HTML>

    Many thanks.


    • Edited by dm75 Friday, December 06, 2013 10:09 AM
    Friday, December 06, 2013 9:59 AM

Answers

  • However, when I try to reassociate hta to mshta I get a message saying it is not possible on Windows 8 machines. 

    I carried out my test on a Windows 7 machine. It would help if you stated right at the start that you use Windows 8.1.

    On my Windows 8.1 machine I had no problem when right-clicking the file Launch_File_Directory.htm and telling Windows to open it with IE11. Mshta.exe has no objection to running your hta code. When right-clicking the file, one of the options under "Open with" is "Microsoft HTML Application Host".

    Friday, December 06, 2013 3:23 PM

All replies

  • I use IE10 and your code runs without error on my machine. What makes you think that IE10 no longer supports hta code?
    Friday, December 06, 2013 12:03 PM
  • Hello Forest Brook. 

    Thanks for testing the code on your machine.  Sometimes Windows machines lose the file association for hta.  It is meant to be associated with mshta in the windows/system32 folder.

    However, when I try to reassociate hta to mshta I get a message saying it is not possible on Windows 8 machines.

    I then posted this query to the Windows 8.1 Compatibility Forum and got a reply saying it was incompatible:

    "The Internet Explorer team is increasingly focused on standards compliance, and markup-based behaviors are not part of modern web standards. In IE10 mode support for markup based behaviors has been removed, and this includes hta:application."

    My Windows 8.1 Compatibility forum question

    It has led me to post on here to see if there is an alternative piece of coding I can use to perform the same job.








    • Edited by dm75 Friday, December 06, 2013 2:16 PM
    Friday, December 06, 2013 1:28 PM
  • If you're running Windows 8, then you've got at least PowerShell 3.0.  You could rewrite your application as a PowerShell script leveraging either Windows Forms or WPF / XAML.  Either way, if you're planning to try to write a GUI in PowerShell, I'd recommend checking out the Sapien forum dedicated to this topic at http://www.sapien.com/forums/viewforum.php?f=21 .  Lots of good information over there.
    Friday, December 06, 2013 2:43 PM
  • David

    Thanks for the reply.  I posted a request for help to that forum.  As I have no programming skills myself, hopefully someone will be able to write some code, or I can pay someone to if necessary.

    If I get a solution, I will post it here too.

    Friday, December 06, 2013 3:16 PM
  • However, when I try to reassociate hta to mshta I get a message saying it is not possible on Windows 8 machines. 

    I carried out my test on a Windows 7 machine. It would help if you stated right at the start that you use Windows 8.1.

    On my Windows 8.1 machine I had no problem when right-clicking the file Launch_File_Directory.htm and telling Windows to open it with IE11. Mshta.exe has no objection to running your hta code. When right-clicking the file, one of the options under "Open with" is "Microsoft HTML Application Host".

    Friday, December 06, 2013 3:23 PM
  • Sometimes Windows machines lose the file association for hta.

    I would investigate the root cause of this problem (if this is, in fact, the problem).

    However, when I try to reassociate hta to mshta I get a message saying it is not possible on Windows 8 machines.

    You need to tell the specific error message you're getting. Your problem description is too vague.

    Bill

    Friday, December 06, 2013 3:27 PM
  • Hi Bill

    No idea what causes machines to lose file association for hta.  It happens occasionally on different machines I support.  I would love to know.  It would save me a lot of tech support! 

    I don't actually have a Windows 8 machine in front of me right now, so I cannot give you the exact message that appears.  But it is just a one liner telling me it was not possible with no further guidance.  I will post it when I next see the message.





    • Edited by dm75 Friday, December 06, 2013 4:05 PM
    Friday, December 06, 2013 3:59 PM
  • There is no issue with 8.1 and an HTA. 

    I just ran this on 8.1 with IE 11 with no issues.

    If you right click on the hta file you will see a selection to run as "Microsoft (R) HTML Application Host" 

    Nothing has changed.  I suspect you have broken the association by trying to fix it.

    The notes you received address certain markup based behaviors like gradients.  These were MS specific markups.  They have nothing to do with the ability to run an HTA or with file associations.

    You have only posted a small piece of your code.  There are no markups in the file you have posted so it is not possible to know what you are tlking about.  You need to post the actual files.

    What markups are you trying to use?


    ¯\_(ツ)_/¯

    • Proposed as answer by jrv Friday, December 06, 2013 4:59 PM
    Friday, December 06, 2013 4:58 PM