2

Can anyone think of a workaround for the hta:application-tag issue? For writing an HTA with full html5 support it's necessary to set a meta-tag with "ie=edge", but then the hta:application-tag parameters don't have any effect. Is there a way to reproduce the single instance behavior?

MvB
  • 27
  • 5
  • 1
    The problem is recognized by Microsoft and right now not solvable without some kind of workaround: https://social.msdn.microsoft.com/forums/ie/en-us/fa1a9128-c933-409b-9d6e-11770e631e52/htaapplication-tag-does-not-work-in-ie10 – MvB Dec 04 '14 at 17:11
  • 1
    You could use WMI to check, if a similar process is running. It won't prevent the HTA to start, but you can close it if it appears to be running already. Though this works in a single local machine only. – Teemu Dec 15 '14 at 18:43
  • Been doing that, but i can only close either any other mshta.exe process or the instance itself when there are other mshta processes around because I cannot define an hta application name in the tag that could be looked up. What I'm looking for is a unique identifier for the specific hta I'm running other than that declared in the tag variable. Can't upvote yet, btw :-) – MvB Dec 15 '14 at 19:37
  • 1
    Not perfect, but check the commandline from mshta processes, and if you find the same as current, just close the current instance using `top.close()` instead of WMI methods. I'm not aware, how to really "get in" an running window, if you'll find out, please answer your own question. – Teemu Dec 15 '14 at 19:41
  • Thx, haven't thought of that. Will do. – MvB Dec 15 '14 at 19:43
  • 1
    Another way is to at first check existence of a file, or a registry key perhaps. If it doesn't exist, then create it. If it exists, then that particular app is already running. Before closing the original running app, you need to remove the file/key ofcourse. This would work (with a file) in intranet environments too. – Teemu Dec 15 '14 at 19:59
  • There isn't any workaround for the `` tag as far as I know, but there can be workarounds for HTML5 inputs in early versions of IE (see [here](http://stackoverflow.com/questions/13982973/is-it-possible-to-run-some-html5-input-types-in-ie8/27090739#27090739)) – Donald Duck Jan 31 '15 at 11:44

0 Answers0