WindowsProcessMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

WindowsProcessMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The class to run processes on Windows.
Example
// run command
dim w as new WindowsProcessMBS

w.CommandLine = "cmd /c dir"
w.CurrentDirectory = "C:"

if not w.run then
MsgBox w.LastErrorMessage
Return
end if

// wait
while w.Running
app.YieldToNextThread
wend

// show result
dim a as Integer = w.AvailableBytesOutput
dim r as string = w.ReadOutput(a)
MsgBox r

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:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx

See also NSTask (Mac only), WindowsShellExecuteAsAdminMBS, WindowsShellExecuteMBS (Windows only), ConsoleExecuteMBS and ShellMBS (cross platform).

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Videos

Release notes


The items on this page are in the following plugins: MBS Win Plugin.


WindowsPrinterMBS   -   WindowsProcessMemoryInfoMBS


💬 Ask a question or report a problem