My hint is to create a VBScript or JScript file for HTA that will be dynamically generated. Therefore, you are not compiling an HTA, but a script. This approach meets your security requirements far better than the HTA packaged in SFX.
First, prepare the resources - import into HTA all external files: scripts, stylesheets and images (base64-encoded) to make your standalone HTA application. Then create, for example, a VBScript file, and copy all the HTML content from your HTA into a string variable in the script, replacing the new lines and tabs with " & vbCrLf & " and " & vbTab & " . Add the code to dynamically create the HTA window , .write() this string variable in the window document and close the script.
Please note that Window_OnLoad() may not work properly due to clicking content on a window that has already been loaded.
Then simply encrypt your completed VBScript in exe (using a real encryption program like Primal Script 2012, ExeScript, VbsEdit or ScriptCryptor). And change the icon using PE Explorer.
All that will take some time, but it's worth it.
UPD: The following is an example prepared by a Script link .
omegastripes
source share