|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Shell||MBS Win Plugin||17.1||No||Yes||No||Yes, Windows only||No|
// run command
dim w as new WindowsProcessMBS
w.CommandLine = "cmd /c dir"
w.CurrentDirectory = "C:"
if not w.run then
// show result
dim a as Integer = w.AvailableBytesOutput
dim r as string = w.ReadOutput(a)
Can be used like shell, but with more windows specific options.
For interactive shell, you need to run cmd.exe yourself.
This shell is asynchronously. For synchrones mode, please write yourself a loop waiting for process to finish.
Please read Microsoft documentation for more details:
See also NSTask (Mac only), WindowsShellExecuteMBS (Windows only), ConsoleExecuteMBS and ShellMBS (cross platform).
- 2 events
- 17 properties
- property ApplicationName as String
- property AvailableBytesError as Integer
- property AvailableBytesOutput as Integer
- property CommandLine as String
- property CurrentDirectory as String
- property Domain as String
- property Environment as Dictionary
- property ExitCode as Integer
- property LastError as Integer
- property LastErrorMessage as String
- property Password as String
- property ProcessHandle as Integer
- property ProcessID as Integer
- property Running as Boolean
- property ThreadHandle as Integer
- property ThreadID as Integer
- property UserName as String
- 10 methods
- method Close
- method PeekError(Length as Integer = 0) as String
- method PeekOutput(Length as Integer = 0) as String
- method ReadError(Length as Integer = 0) as String
- method ReadOutput(Length as Integer = 0) as String
- method Run as Boolean
- method SetKillProcessWhenParentDies as boolean
- method Terminate(ExitCode as Integer) as Boolean
- method Write(Data as MemoryBlock) as Integer
- method Write(Data as String) as Integer
This class has no sub classes.
Some examples which use this class:
- MBS Xojo Plugins, version 20.0r8
- MBS Xojo Plugins, version 19.5pr1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 17.1
- MBS Xojo / Real Studio Plugins, version 17.1pr1
- Running command lines tools on Windows
Xojo Developer Magazine
The items on this page are in the following plugins: MBS Win Plugin.
MBS Xojo Plugins