I was trying to find a way to browse and select a file as a variable using VBScript. The standard methods of using common.dialog were not working thus I used the below:
Set wShell=CreateObject("WScript.Shell")
Set oExec=wShell.Exec("mshta.exe ""about:<input type=file id=FILE ><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
sFileSelected = oExec.StdOut.ReadLine
I would like to be able to add a title to the dialog box that appears, but cannot seem to determine the proper argument to use.
Any help would be greatly appreciated.