Grazie mille per le indicazioni.

Incollo qui il codice funzionante, magari può essere utile a qualcuno.

Sub Main()
' call the Main with arguments
Main(Environment.GetCommandLineArgs())
End Sub

' the "real" Main procedure
Private Sub Main(ByVal args() As String)
' Display arguments passed to the application
Dim s As String
For Each s In args
'if s= application.ExecutablePath
If Not s = Application.ExecutablePath Then
MsgBox(s)
End If
Next
End Sub