Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsProcessMBS class.

WindowsProcessMBS.ApplicationName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The path to the application.

Can be empty when application is part of command line.
(Read and Write property)

WindowsProcessMBS.AvailableBytesError as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Queries number of available bytes on stderr.

(Read only property)

WindowsProcessMBS.AvailableBytesOutput as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Queries number of available bytes on stdout.

(Read only property)

WindowsProcessMBS.CommandLine as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The command line to run.
Example
// Run PowerShell to query execution policy

Dim s As New WindowsProcessMBS
s.CommandLine = "powershell.exe -Command ""Get-ExecutionPolicy -List"""

if s.run then
DelayMBS 0.5

while s.Running
// wait
app.YieldToNextThread
DelayMBS 0.1
wend

dim a as Integer = s.AvailableBytesOutput
Dim output As String = s.ReadOutput(a)

Break // see in debugger

else
break // failed
end if

If applicationName is set, this should only provide parameters.
(Read and Write property)

WindowsProcessMBS.CurrentDirectory as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The current directory for the process.

You can set this before calling Run to specify the start directory.
If this parameter is "", the new process will have the same current drive and directory as the calling process.
(Read and Write property)

WindowsProcessMBS.Domain as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The domain name.

You can set username and password to run app with different user. Domain is optional to specify network domain.
(Read and Write property)

WindowsProcessMBS.Environment as Dictionary

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

w.CommandLine = "cmd /c echo %TEST%"

// set environment
dim env as new Dictionary
env.Value("TEST") = "Hello World"
w.Environment = env

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

(Read and Write property)

WindowsProcessMBS.ExitCode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Queries the exit code of the terminated process.

(Read only property)

WindowsProcessMBS.LastError as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Last windows error code.

(Read only property)

WindowsProcessMBS.LastErrorMessage as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The message text for the last error.

(Read only property)

WindowsProcessMBS.Password as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The password.

You can set username and password to run app with different user. Domain is optional to specify network domain.
(Read and Write property)

WindowsProcessMBS.ProcessHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
For Windows the process handle.

(Read only property)

WindowsProcessMBS.ProcessID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The process ID of the process.

(Read only property)

WindowsProcessMBS.Running as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Checks whether process is running.

Returns true if running or false if not.

The process may not terminate if there is still output data in the pipes. So please read error/stdout regularly.
(Read only property)

WindowsProcessMBS.ThreadHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
For Windows the thread handle for the child process.

(Read only property)

WindowsProcessMBS.ThreadID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The thread ID of the main thread for the process.

(Read only property)

WindowsProcessMBS.UserName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Shell MBS Win Plugin 17.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The user name.

You can set username and password to run app with different user. Domain is optional to specify network domain.
(Read and Write property)

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


The biggest plugin in space...