Tky gentilmente puoi correggermi questo VBS?
In pratica si apre la finestra Scegli File e voglio che quando seleziono il BIN me lo aprisse nel programmino Batch EGROFF.BAT
Option Explicit
Dim strFile
strFile = SelectFile( )
If strFile = "" Then
WScript.Echo "Nessun file selezionato"
Else
' WScript.Echo """" & strFile & """"
End If
Function SelectFile( )
Dim objExec, strMSHTA, wshShell
SelectFile = ""
' For use in HTAs as well as "plain" VBScript:
strMSHTA = "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>"""
' For use in "plain" VBScript only:
' strMSHTA = "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>"""
Set wshShell = CreateObject( "WScript.Shell" )
Set objExec = wshShell.Exec( strMSHTA )
objShell.Run "egroff.bat cmd", 0
SelectFile = objExec.StdOut.ReadLine( )
wshshell.Run "%comspec% /c start egroff.bat"
Set objExec = Nothing
Set wshShell = Nothing
End Function