I am trying to execute a command from within my app using shell.execute.
Dim sh As new Shell
sh.Mode=0
Dim s As string = Path + "upnpc-static.exe -a " + IP + " " + k_sp + " " + sPrt + " "+ k_sp + " " + tPrt + " " + k_sp + " " +Protocol
sh.Execute(s)
I have tried to set the path at least 3 different ways, and each time it fails.
Path = “C:\Axcys%Embedded\Axcys%Embedded%Engine%Service\Resources”
Path = “C:\Axcys Embedded\Axcys Embedded Engine Service\Resources”
Path = “C:\Axcys Embedded\Axcys Embedded Engine Service\Resources”
Without the % it says cannot find path c:\Axcys, the closest I have gotten is the example above with the % sign, but then it says the system cannot find the path specified.
The whole path presented is:
C:\Axcys%Embedded\Axcys%Embedded%Engine%Service\Resources\upnpc-static.exe -a 192.168.0.2 32123 32123 TCP
Can anyone give some suggestions how to handle this??? This is a Win7 platform BTW.
Well,
That did not work… completely.
As presented (thank you again) Shell returns this:
‘“C:\Axcys Embedded\Axcys Embedded Engine Service\Resources\upnpc-static.exe -a”’ is not recognized as an internal or external command, operable program or batch file.
If this is dissected, remarking everything from the right of the .exe, it will execute, but the executable will complain of missing options/commands. So while progress, not complete. I did also try to surround the options/commands -a etc. with a single quote, but that brought me back to it only reading the part c:\axcys as the complete path.