' source file hta_helpomatic.hta ' http://www.microsoft.com/en-us/download/details.aspx?id=17332 ' HTA dinamically created via VBS ' this script is for further encryption and compilation to exe With CreateWindow() .Document.Write "" & vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ "The HTA Helpomatic -- Presented by the Microsoft Scripting Guys" & vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ vbCrLf & _ vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ vbCrLf & _ "" & vbCrLf & _ " 
" & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ "
HTA Elements
" & vbCrLf & _ "

The HTA Helpomatic is designed to help you write Hypertext Applications (HTAs). To use the Helpomatic, select an item from the list labeled HTA Elements. When you do so, code for including the element in an HTA will appear in the box labeled HTML Code and/or in the box labeled Subroutine Code. Depending on the option selected, a sample element will also appear in the portion of the screen labeled Sample.
 
If you wish, you can modify the code in the HTML Code box, then click the Reset Example button to see the results of those modifications. When satisfied, click Copy to Clipboard to copy the relevant code.
 
You can also modify the script code, and configure the sample to use that code by clicking the Reset Example button found in the area labeled Subroutine Code.
 
Note: There is little error-checking in the HTA Helpomatic. If you enter improper HTML or script code, you might get an error message asking if you want to continue to run scripts on this page. If that occurs, click Yes and then continue.
" & vbCrLf & _ "
" & vbCrLf & _ "

 HTML Code

" & vbCrLf & _ "      " & vbCrLf & _ "

" & vbCrLf & _ "

" & vbCrLf & _ " Subroutine Code

" & vbCrLf & _ "      " & vbCrLf & _ "


 
" & vbCrLf & _ "
" & vbCrLf & _ "Sample

" & vbCrLf & _ "" & vbCrLf & _ vbCrLf & _ "" End With Function CreateWindow() Rem source http://forum.script-coding.com/viewtopic.php?pid=75356#p75356 Dim sSignature, oShellWnd, oProc On Error Resume Next sSignature = Left(CreateObject("Scriptlet.TypeLib").Guid, 38) Do Set oProc = CreateObject("WScript.Shell").Exec("mshta about:""""") Do If oProc.Status > 0 Then Exit Do For Each oShellWnd In CreateObject("Shell.Application").Windows Set CreateWindow = oShellWnd.GetProperty(sSignature) If Err.Number = 0 Then Exit Function Err.Clear Next Loop Loop End Function