When I was looking into the .hta
filetype online, it appears to be referenced as a program, however I know that mshta.exe
is the program used for them. Does that mean .hta
is actually just a file that uses mshta.exe to interpret it (effectively mshta.exe is a stripped down browser)? Does that mean if someone created a new program to replace mshta.exe, one can have hta files open with that new program?
CodePudding user response:
I suppose if you want to be really pedantic, only .exe files with a PE header are actual programs to Windows (Windows 95/98/ME would also run DOS .exe and .com files directly). Anything else cannot be run directly by CreateProcess
and needs some kind of interpreter.
A .hta file (HTML Application) is basically web page with some special syntax and usually some HTML and Javascript. And yes, mshta.exe is a stripped down browser (most likely hosting mshtml/trident) and could theoretically be replaced by another host program. .hta is not special in any way, anyone could create a custom file extension and register their interpreter as the handler for those files, it is no different than Notepad.exe "%1"
being the default handler for .txt files...