Code: Select all
RunProgram("net use е: \\192.168.1.1\WD")Code: Select all
RunProgram("net use е: \\192.168.1.1\WD")So, you'd want "net" to be your first string, and everything after that should be in the second parameter.Result = RunProgram(Filename$ [, Parameter$, WorkingDirectory$ [, Flags [, SenderProgram]]])
Description
Launches an external program.
Parameters
Filename$
The executable name including its path.
Parameters$ (optional)
Specifies the command line parameters that will be passed to the program.
...snip...
Code: Select all
compiler = RunProgram("cmd.exe" , "/c netstat -n", "", #PB_Program_Open | #PB_Program_Read | #PB_Program_Hide)
Debug compiler
Debug "---"
Output$ = ""
If compiler
Debug "I'm in"
While ProgramRunning(Compiler)
If AvailableProgramOutput(Compiler)
Output$ + ReadProgramString(Compiler) + Chr(13)
Debug Output$
EndIf
Wend
KillProgram(compiler)
CloseProgram(compiler)
EndIf