Files
gtav-src/tools_ng/dcc/current/max2012/scripts/pipeline/util/RSProcess.ms
T
2025-09-29 00:52:08 +02:00

38 lines
857 B
Plaintext
Executable File

struct RsProcess
(
processObj = undefined,
processID = 0,
exitCode = -1,
fn RunProcess filename args silent:false waitForExit:true workingDir:undefined =
(
processObj = dotNetObject "System.Diagnostics.Process"
windowStyle = dotNetClass "System.Diagnostics.ProcessWindowStyle"
if (processObj != undefined) then
(
processObj.StartInfo.FileName = filename
processObj.StartInfo.Arguments = args
if (workingDir != undefined) then
(
processObj.StartInfo.WorkingDirectory = workingDir
)
if silent then
(
processObj.StartInfo.WindowStyle = windowStyle.Hidden
processObj.StartInfo.CreateNoWindow = true
)
processObj.Start()
processID = processObj.Id
if waitForExit then
(
processObj.WaitForExit()
exitCode = processObj.ExitCode
)
)
)
)