title: HTA Browse to file
body: <p>Im trying to browse to files.</p>
  
  <p>It works fine as a simple vbs but when inside a HTA produces an Error.</p>
  
  <p>Like this:</p>
  
  <pre><code>sUserList = BrowseToFile
  msgbox sUserList
  
  Function BrowseToFile
      Set wShell=CreateObject("WScript.Shell")
      Set oExec=wShell.Exec("mshta.exe ""about:&lt;input type=file id=FILE&gt;&lt;script&gt;FILE.click();new ActiveXObject(""Scripting.FileSystemObject"").GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);&lt;/script&gt;""")
      BrowseToFile = oExec.StdOut.ReadLine
  End Function
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>Line 130: Is the wShell.exec
  Char 203:
  Unterminated String Constant.
  </code></pre>
  
  <p>I could call a separate vbs and write to file then get it that way.</p>