Bloxstrap basically copies how the official Roblox bootstrapper works and then adds extra features to make it more helpful, which wouldn’t be possible otherwise.Thus, useful information on how the Roblox bootstrapper works can benefit many people.
We’ll talk about how the bootstrapper works now, not its history unless we need to (it goes back to 2008). This explanation will concentrate solely on the Windows platform, as the workings on Mac are unknown due to the absence of a Mac device for testing.
Bootstrapper Installation
Roblox is installed to a folder called %LOCALAPPDATA%\Roblox, but only for a single user account. It used to be possible to install it system-wide as an Administrator, but not anymore because it caused a lot of problems with permissions. We’ll only discuss how it works when installed and run in single-user mode.
Installing/Updating Roblox
Identifying game client versions
Every version of the Roblox game client has different identifiers, but the most important one is the version GUID. This is used to identify versions on Roblox’s deployment system. For example, a version GUID could look like version-824aa25849794d67.
You can get the latest version GUID from https://clientsettingscdn.roblox.com/v2/client-version/WindowsPlayer. This website gives you a JSON response, and you can find the version GUID under the attribute clientVersionUpload.
The bootstrapper keeps track of the version GUID for the current Roblox installation. It will check that API whenever it is launched and perform a Roblox update if the most recent version GUID has changed.
The deployment system
Roblox puts the game client into different .zip files called packages and uploads them to Amazon S3. Then, they copy their S3 storage to several different CDNs. Here are all the domains where you can download Roblox from.
Type | Base URL | NOTES |
Amazon S3 | https://s3.amazonaws.com/setup.roblox.com/ | Where everything is sourced from. Also the slowest, that’s why the CDNs exist. |
Amazon S3 | http://setup.roblox.com/ | A direct alias for S3 above. Avoid using this, HTTPS doesn’t work properly on it. |
Akamai | https://setup-ak.rbxcdn.com/ | CDN mirror for S3 |
Cachefly | https://roblox-setup.cachefly.net/ | CDN mirror for S3 |
Cachefly | https://setup-cfly.rbxcdn.com/ | A direct alias for the domain above on rbxcdn.com. |
Balanced | https://setup.rbxcdn.com/ | Preferred, CDN balancer that automatically chooses between Akamai and Cachefly. |
The bootstrapper usually uses the balanced one. However, it will also use the other mentioned domains if setup.rbxcdn.com is not available, such as when it’s down or blocked.
The self-updating mechanism
You might have noticed that the latest version API provides a version number for the bootstrapper. What does this mean?
In addition to updating Roblox, the bootstrapper can also update itself. It’s always built and sent out with a Roblox version. When it’s getting ready to install a new Roblox version, it checks its own version number against the latest one. If it needs to, it updates itself before updating Roblox.
You’ll notice this if you see a quick “Please wait…” or “Getting the latest Roblox…” message when the bootstrapper starts up.
Downloading and assembling an installation
Now, let’s talk about downloading files. In addition to the packages, there are files that contain manifest data, like rbxManifest.txt and rbxPkgManifest.txt.
How do you download these files? The files for each version GUID are stored at the base URL, with their filenames starting with the version GUID. For instance, rbxPkgManifest.txt for version-824aa25849794d67 on the CDN balancer will be found at https://setup.rbxcdn.com/version-824aa25849794d67-rbxPkgManifest.txt.
rbxManifest.txt stores information about each game client file, with data arranged in pairs of lines. It mainly records the MD5 hash of each file. While it was once used to check the integrity of a Roblox installation, the bootstrapper hasn’t performed this check in years. Despite this, the file is still created for new version deployments.
rbxPkgManifest.txt contains details about each downloadable package, organized in groups of four lines. It includes information like compressed size, uncompressed size, and MD5 hash for each package. File sizes are listed in bytes. This manifest helps identify which packages to download and determines the required disk space for installing or updating Roblox.
The bootstrapper has a built-in list that keeps track of where each package should be extracted. You can find this information yourself using a hex editor or a similar tool.
Roblox installations are saved in %LOCALAPPDATA%\Roblox\Versions<version GUID>. Downloaded packages are stored in %LOCALAPPDATA%\Roblox\Downloads. These folders are usually cleaned up automatically after some time or after an update.
In summary, the bootstrapper gets the list of packages to download from the package manifest, downloads them, and extracts them. It’s quite straightforward.
Installing WebView2
A small detail to note: unlike other packages, WebView2RuntimeInstaller.zip is only extracted if the WebView2 runtime is not already installed. The bootstrapper checks for this based on specific registry keys.
If the WebView2 runtime is not installed, the bootstrapper extracts the package containing the runtime installer. It then runs the installer with the arguments /silent /install, which ensures that the installation process is quiet and automatic in the background. While the bootstrapper shows its own indefinite progress dialog.
Starting Roblox
If the bootstrapper is launched on its own, either directly or through the ‘Roblox Player’ shortcut, Roblox will start with only the –app argument, indicating that it’s a desktop app launch.
Protocol/URI handling
Roblox has two registered protocols: roblox and roblox-player. The roblox protocol is newer and is used specifically for universal deeplinking, while the roblox-player protocol is more traditional and is used for other purposes. Here are some examples of launch URIs that use these protocols, which you can try out by pasting them into your browser’s URL bar:
roblox-player:1+launchmode:app
roblox://experiences/start?placeId=1818
The first URI will launch the desktop app, while the second will launch and join the game Crossroads. This is how Roblox starts up from your web browser.
The roblox://experiences/start deeplink supports the following parameters:
– placeId
– gameInstanceId
– accessCode
– linkCode
– launchData
– joinAttemptId
– joinAttemptOrigin
– reservedServerAccessCode
– callId
– browserTrackerId
Brief explanation to clarify:
- The term “protocol” refers to protocol identifiers such as roblox and roblox-player
- Launch URI: This is the full special string used to start the application, like “roblox-player:1+blahblahblah.”
- The term “protocol handler” refers to the application that’s launched to handle the protocol
The detailed explanation of how Windows protocol handlers function will be skipped. If you don’t know how, it’s fairly easy to grasp. If you have Roblox installed, just open the Registry editor, go to navigate to HKEY_CURRENT_USER\SOFTWARE\Classes\roblox-player, and examine its structure to learn more.
Every protocol, like roblox-player, has a protocol handler, which is just an application. You can see how the launch URI is passed to the protocol handler by looking at the shell\open\command under the protocol’s registry key. In Windows, this is denoted as %1. The Roblox game client is registered as the protocol handler and is updated whenever Roblox updates.
When the bootstrapper launches Roblox, it sends the protocol string directly to RobloxPlayerBeta.exe as the first argument. You usually don’t need to do anything with this, unless you want to change how Roblox behaves.
Parsing Roblox-player protocol URIs
Regarding the roblox-player protocol, here’s a longer example URI:
roblox-player:1+launchmode:play+robloxLocale:en_us+gameLocale:en_us+LaunchExp:InApp
This URI cleverly forms a stream of key-value pairs, all delimited by ‘+’ symbols, including the protocol identifier itself. If we were to serialize this to JSON for clarity, it would resemble this:
{“roblox-player”: 1, “launchmode”: “play”, “robloxLocale”: “en_us”, “gameLocale”: “en_us”, “LaunchExp”: “InApp”}
If you ever need to parse or modify the string, you don’t need to do anything special or complicated; it’s straightforward.
The bootstrapper isn’t actually that relevant anymore
It’s earlier mentioned that the Roblox game client is registered as the protocol handler. That was not a mistake; that’s how it is now. Roblox did this to reduce the time it takes for the game client to launch by removing the bootstrapper from the launch process entirely. It’s a pretty clever move.
However, how does this work? When the game client launches, it checks for the version number, not the version GUID. If there’s an update available, it then launches the bootstrapper to carry out the update.
You can verify this by opening a Roblox log file, where you’ll find this information at the beginning.
2023-12-27T08:37:46.538Z,0.538225,7544,6,Info [FLog::UpdateController] UpdateController: versionQueryUrl: https://clientsettingscdn.roblox.com/v2/client-version/WindowsPlayer/channel/zflag
2023-12-27T08:37:46.538Z,0.538225,7544,6,Info [FLog::UpdateController] WindowsUpdateController: updaterFullPath: C:\Users\pizzaboxer\AppData\Local\Roblox\Versions\version-48a28da848b7420d\RobloxPlayerInstaller.exe
2023-12-27T08:37:46.539Z,0.539225,792c,6,Info [FLog::UpdateController] Update thread: started with protStr roblox-player:1+roblox-player:1+launchmode:play+robloxLocale:en_us+gameLocale:en_us+LaunchExp:InApp
2023-12-27T08:37:46.539Z,0.539225,792c,6,Info [FLog::UpdateController] Checking if updater exists at C:\Users\pizzaboxer\AppData\Local\Roblox\Versions\version-48a28da848b7420d\RobloxPlayerInstaller.exe. Returning true
2023-12-27T08:37:46.730Z,0.730281,7544,6 [FLog::Output] Settings Date header was Wed, 27 Dec 2023 08:37:47 GMT
2023-12-27T08:37:46.730Z,0.730281,7544,6 [FLog::Output] Settings Date timestamp is 1703666267
2023-12-27T08:37:46.959Z,0.959281,792c,6,Debug [FLog::UpdateController] version response: {“version”:”0.605.3.6050660″,”clientVersionUpload”:”version-48a28da848b7420d”,”bootstrapperVersion”:”1, 6, 3, 6050660″}
2023-12-27T08:37:46.960Z,0.960281,792c,6,Info [FLog::UpdateController] Update thread: isUpdateRequired FALSE
If RobloxPlayerInstaller.exe is missing from the game client’s folder, Roblox skips this version check. If the game client was launched with a launch URI, it passes that URI back to the bootstrapper as an argument when starting it.
That covers the basics of how the Roblox bootstrapper operates. Hopefully, this has answered any questions you had about it.