Skip to content

Command Line and Handoff

gokuthug1 edited this page Oct 5, 2026 · 2 revisions

Command Line and Handoff

GokuTrap does accept command-line arguments. This page lists what they actually do.

Mode arguments

Exactly one of these decides what GokuTrap opens. They are evaluated in this order, and the first match wins:

Argument Result
-uninstall Opens the uninstaller
-menu, -preferences, -settings Opens the settings window. All three are aliases for the same flag
-watcher Starts the Roblox process watcher
-backgroundupdater Runs the background updater
-player [args], -studio [args] Starts the bootstrapper for Player or Studio
-bloxshade Opens the Bloxshade configuration
(none of the above) Opens the launch menu — see Launch-Menu
-quiet (with none of the above) Exits immediately without showing anything

roblox: and roblox-player: URI arguments are also recognised as a first argument and start the Player bootstrapper, the same way a Roblox website link does.

Behaviour arguments

These modify how the chosen mode behaves:

Argument Effect
-force Forces the upgrade path, so Roblox is reinstalled rather than reusing the existing version
-nolaunch Runs the bootstrapper but does not start Roblox afterwards
-channel [name] Overrides the deployment channel for this launch. See Deployment-and-Channel
-version <hash> Forces a specific Roblox version. Also accepted as a bare version-... first argument
-upgrade Internal. Signals a relaunched instance to take over an update. Set by the updater
-quiet Suppresses interactive prompts and windows
-testmode Keeps the launcher running so runtime features can be exercised without a real session
-nogpu Disables GPU-accelerated rendering for GokuTrap's own UI

uninstall and watcher also bypass the GokuTrap update check, since neither should be interrupted by one. (Every flag bypasses it in a debug build.)

Syntax

  • Arguments begin with a single hyphen: -menu, not --menu.
  • A flag may be followed by a value — for example -channel ptb. The value is the next argument, provided it does not itself start with a hyphen.
  • Unknown arguments are ignored, and a repeated flag is only accepted once. There is no error for a typo, so check the result if you are scripting.

Roblox Studio file association

During install, GokuTrap registers the Studio executable so that double-clicking a .rbxl place file launches Roblox Studio, passing the file path as -ide "%1". This makes Studio behave like a normal registered application.

The registration is per-user, under HKCU.

Handoffs between GokuTrap instances

Single instance

GokuTrap guards against duplicate launches. If another instance already holds the log, the second instance detects it, writes a "possible duplicate launch detected" message and terminates rather than corrupting shared state.

Update handoff

  1. The running instance verifies a staged download and passes checks.
  2. It starts a new GokuTrap process with -upgrade.
  3. The new instance performs an atomic File.Replace of GokuTrap.exe, keeping the previous file as GokuTrap.exe.rollback.
  4. Dispatcher-marshalled inter-process locks ensure the handoff is ordered correctly and are cleaned up independently of progress state, so a cancelled download cannot leave a stale lock.

If another GokuTrap instance has the executable open, the handoff fails cleanly and says so. See Application-Updates#Rollback.

Roblox Studio file association

During install, GokuTrap registers the Studio executable so that double-clicking a .rbxl place file launches Roblox Studio, passing the file path as -ide "%1". This makes Studio behave like a normal registered application.

The registration is per-user, under HKCU.

Launch modes and the version flag

The launch mode is passed in by whatever started GokuTrap:

Mode Result
Unknown The bootstrapper decides. Only meaningful when a version flag is set
Player Launch Roblox Player
Studio Launch Roblox Studio
StudioAuth Launch Studio for an authenticated session

See Launch-Menu.

Exit codes

GokuTrap terminates with an error code for a small number of conditions — most visibly an install failure, and an attempt to uninstall before GokuTrap is installed. These are internal signals rather than a stable public API, so do not depend on the specific values.

Environment

GokuTrap needs no environment variables to run. The install folder is discovered through the per-user uninstall registration and the running executable's location. See File-Locations.

Scripting

A few patterns are safe and stable:

GokuTrap.exe -menu            # open settings directly
GokuTrap.exe -uninstall       # open the uninstaller
GokuTrap.exe -channel ptb     # launch using a specific channel

For anything else, prefer the Windows shortcut and its properties over inventing arguments, because an unrecognised argument is silently ignored rather than reported.

Related

Clone this wiki locally