What is the future of mshta.exe since Internet Explorer is officially going away?

David McDivitt 216 Reputation points
2021-05-20T13:42:30.737+00:00

I have a lot of applications written as HTA files. When Internet Explorer goes away will I still be able to run these? I like HTA because I get the best of all worlds, using HTML, JavaScript, a web browser, and working with files on the computer.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,431 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sam of Simple Samples 5,546 Reputation points
    2021-05-21T02:25:48.483+00:00

    See Lifecycle FAQ - Internet Explorer and Microsoft Edge. It says Internet Explorer is a component of the Windows operating system. In other words, IE is not going away. That article also says Internet Explorer 11 will continue receiving security updates and technical support for the lifecycle of the version of Windows on which it is installed. In other words, IE will always be a part of Windows 10 and previous versions of Windows.

    If the purpose if a HTA is to use HTML as a UI then there are alternatives with better support.

    I do not know if there is a VBScript version of Single Page Applications (SPAs) but that might work. Otherwise, a SPA using JavaScript might work.

    An ASP.Net Core application can host itself in a browser. An ASP.Net Core application can use Blazor that provides Single Page Applications (SPAs), so that might be similar to a HTA. If you go that route then prepare to be confused by the similarity of names; Blazor uses Razor, like other ASP.Net Core applications use. You can fiddle with Blazor in BlazorFiddle.

    Something even newer is .Net MAUI. You can develop a .Net MAUI application that uses Razor for the UI. Since they would be a desktop application they would (like a HTA) have more access to resources, such as files, than an application in a browser. You probably do not need your applications to execute in Android, iOS or macOS (Linux later) but there would be much more support of .Net MAUI applications.

    The only advantages I can think of of HTAs is that they can be developed using a plain text editor and they have more access to resources outside the browser.

    3 people found this answer helpful.

7 additional answers

Sort by: Most helpful
  1. Les Ferch 46 Reputation points
    2021-07-26T01:47:39.53+00:00

    HTAs are launched by MSHTA.exe and rendered by the Trident MSHTML engine included with Windows. You can uninstall Internet Explorer or Edge and HTAs will continue to work. There are specific settings you can put in your HTA to control what compatibility mode the HTA runs in, but none of those modes require the Internet Explorer or Edge application to be present. HTAs continue to work in Windows 7, 8, 10 and 11, but the rendering engine is limited to IE 11 or Legacy Edge capabilities.

    It's a shame that Microsoft stopped updating the HTA infrastructure, but at least they did not remove the technology from the OS. You can still write HTAs in VBScript or JavaScript and they'll work just fine.

    Feel free to ask me anything related to HTAs. I spend a LOT of hours recently writing a tool called WinSetView which has an HTA interface. You can find it on GitHub.

    3 people found this answer helpful.

  2. David McDivitt 216 Reputation points
    2022-12-23T18:23:12.653+00:00

    I make HTA apps frequently, copying one I have then modifying. Each has it's own folder but pulls a common javascript and style sheet file from the parent folder. The apps open in their own window and I have complete control over the window for size and position. Not declaring the browser type is best.

    <html><head><title>Overtime</title>  
    <hta:application applicationname="Overtime" id="hta_overtime" showintaskbar="yes" scroll="no" singleinstance="yes" />  
    <link href="..\_common\sheet.css" rel="stylesheet" type="text/css" />  
    <script src="..\_common\common.j$" language="javascript">  
    </script>  
    <script src="app.hta.j$" language="javascript">  
    </script>  
    </head>  
    <body onload="setup();" onunload="return save();" onresize="wsize();">  
      
    
    1 person found this answer helpful.

  3. Leon Laude 85,861 Reputation points
    2021-05-20T13:46:51.23+00:00

    Hi @David McDivitt ,

    Microsoft Edge has an Internet Explorer (IE) mode which you can use to run older applications.
    https://learn.microsoft.com/en-us/deployedge/edge-ie-mode

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Best regards,
    Leon


  4. Leon Laude 85,861 Reputation points
    2021-05-21T06:04:52.39+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.