Process Window Library
External process, process-window, relaunch, and force-kill nodes.
Use this library for trusted launcher workflows, external tools, process control, and packaged-game window management.
Python examples use Unreal's reflected API names through the unreal module. Use the packaged-runtime safeguards described below before calling relaunch or force-kill helpers from Python.
Include The Modules
This page covers nodes from two plugin modules.
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"SystemUtilityModule",
"DeviceFrameworkModule"
}
);#include "OpenApps.h"
#include "HardwareInfoLibrary.h"Launch App
Launches an external executable and returns the best process ID found for it.
| Pin | Direction | Description |
|---|---|---|
ExePath | Input | Executable file path to launch. |
Arguments | Input | Command-line arguments appended after the executable path. |
bHidden | Input | Hides the launched process window when Windows allows it. |
Return Value | Output | Best process ID found for the launched process tree. |
#include "OpenApps.h"
const int32 ProcessId = UOpenApps::LaunchExternalProcess(
TEXT("C:/Tools/MyApp.exe"),
TEXT("--minimized"),
true
);import unreal
process_id = unreal.OpenApps.launch_external_process(
"C:/Tools/MyApp.exe",
"--minimized",
True,
)Kill Process Tree
Terminates a process and its discovered child processes.
| Pin | Direction | Description |
|---|---|---|
ProcessID | Input | Root process ID to terminate. |
Return Value | Output | True when the root process is no longer running after the kill attempt. |
#include "OpenApps.h"
const bool bKilled = UOpenApps::KillProcessTree(ProcessID);import unreal
killed = unreal.OpenApps.kill_process_tree(process_id)Is Process Running
Checks whether a process ID is still active.
| Pin | Direction | Description |
|---|---|---|
ProcessID | Input | Process ID to check. |
Return Value | Output | True when the process is still running. |
#include "OpenApps.h"
const bool bRunning = UOpenApps::IsProcessRunning(ProcessID);import unreal
is_running = unreal.OpenApps.is_process_running(process_id)Focus App
Brings the main visible window for a process to the foreground.
| Pin | Direction | Description |
|---|---|---|
ProcessID | Input | Process ID whose visible top-level window should be focused. |
Return Value | Output | True when a matching window was found and activated. |
#include "OpenApps.h"
const bool bFocused = UOpenApps::BringAppToFront(ProcessID);import unreal
focused = unreal.OpenApps.bring_app_to_front(process_id)Can Relaunch Game
Returns whether the current runtime context safely allows relaunching the packaged game executable.
| Pin | Direction | Description |
|---|---|---|
Return Value | Output | True when the runtime is not editor or commandlet and the executable path is usable. |
#include "HardwareInfoLibrary.h"
const bool bCanRestart = USystemInfoBPLibrary::CanRestartGame();import unreal
can_restart = unreal.SystemInfoBPLibrary.can_restart_game()Relaunch Game
Relaunches the packaged game executable with optional extra command-line text.
| Pin | Direction | Description |
|---|---|---|
ExtraCommandLine | Input | Extra command-line text appended to the relaunched process. |
#include "HardwareInfoLibrary.h"
USystemInfoBPLibrary::RestartGameWithCommandLine(TEXT("-myflag=value"));import unreal
unreal.SystemInfoBPLibrary.restart_game_with_command_line("-myflag=value")Can Force Kill Game
Returns whether a hard process kill is allowed in the current runtime context.
| Pin | Direction | Description |
|---|---|---|
Return Value | Output | True when the plugin allows immediate process termination. |
#include "HardwareInfoLibrary.h"
const bool bCanKill = USystemInfoBPLibrary::CanForceKillGame();import unreal
can_force_kill = unreal.SystemInfoBPLibrary.can_force_kill_game()Force Kill Game Process
Immediately terminates the packaged game process.
| Pin | Direction | Description |
|---|---|---|
| No pins | Output | The current process is terminated when the runtime allows it. |
#include "HardwareInfoLibrary.h"
USystemInfoBPLibrary::ForceKillGame();import unreal
unreal.SystemInfoBPLibrary.force_kill_game()Last updated on