OK, as I wrote in the update of the question, the problem was in the link. Presumably the .application
file ran the local .exe
file on my machine, but for some reason didn't pass in the argument to it. I had to open directly the local .exe
file.
To solve this problem, I added code along these lines (validation/exception handling logic omitted for brevity):
Dim path As String = Environment.GetEnvironmentVariable("LOCALAPPDATA") & "\apps\2.0"
Dim files() As String = Directory.GetFiles(path, "MyApp.exe", IO.SearchOption.AllDirectories)
Process.Start(files(0), "4")
Not an optimal solution (since it assumes that the local .exe
file is located in some subfolder of %LOCALAPPDATA%\apps\2.0
), but at least it solved my problem...