Lua
C++
Edit

Command

This function allows you to interact with the operating system terminal or console. This can be used to perform low-level system actions.

Syntax

Parameter Description
command command to execute
stream optional stream for capturing printed output

Returns

Returns the result of the command.

Remarks

On the Windows operating system the command output will be piped to a file stored in the system "ProgramData/Ultra Engine" directory. This file should be deleted if the command output contains any sensitive information.

Example

local stream = CreateBufferStream()
Command("systeminfo | findstr /B /C:\"OS Name\"", stream)

while not stream:Eof() do
    Print(stream:ReadLine())
end
Copyright © 2024 Ultra Software.
All rights reserved.