Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

Steam stays visible to 32-bit registry lookups in an environment with an HKCU\Software\Wow6432Node key, which fixes Rockstar launcher error 113 there. A player (crêpe on Discord) traced their Red Dead Redemption 2 error 113 to it: their environment, moved off the Wine 10 engine on 2026-09-29, got 53 HKCU\Software\Wow6432Node keys from an early Wine 11 engine's first boot (r7). Windows shares HKCU\Software between the 32- and 64-bit views, but Wine redirects a 32-bit lookup into that subtree as soon as any such key exists, so the launcher's lookup of HKCU\Software\Valve found nothing and it decided Steam was not running. Reproduced here on the default engine r26 and the Wine 11 engine r23: with a Wow6432Node\Probe key, `reg query HKCU\Software\Valve\Steam /reg:32` fails, and a registry link from Wow6432Node\Valve to Software\Valve, the player's fix, makes it succeed and survives the server saving the hive. Moving a Wine 10 environment to r8 or r23 today does not create the subtree. WineRunner.start now adds that link before anything starts the environment's server, only when the hive has the subtree, has Steam's keys and has no Wow6432Node\Valve, by appending to user.reg, and says so in the launch log. Checked end to end through the CLI on a throwaway environment. New tests.

Gauthier Piarrettefcee4f64b2a9
diff --git a/Sources/HighballKit/SteamRegistryView.swift b/Sources/HighballKit/SteamRegistryView.swift
new file mode 100644
index 0000000..221f56e
--- /dev/null
+++ b/Sources/HighballKit/SteamRegistryView.swift
@@ -0,0 +1,50 @@
+import Foundation
+
+/// Keeps Steam's registry keys visible to 32-bit lookups in an environment whose user hive has a
+/// `Software\Wow6432Node` key (Red Dead Redemption 2 stopping with Rockstar launcher error 113,
+/// found and fixed by a player, crêpe on Discord, 2026-10-13).
+///
+/// Windows shares HKCU\Software between the 32-bit and 64-bit registry views. Wine treats it as
+/// redirected as soon as any `HKCU\Software\Wow6432Node` key exists, and a lookup in the 32-bit
+/// view then goes into that subtree, where Steam's keys are not. The Rockstar Games Launcher
+/// reads HKCU\Software\Valve that way, concludes Steam is not running and stops with error 113
+/// (LAUNCHER_ERR_STEAM_FAILED). Measured on the default Wine 10 engine (r26) and the Wine 11
+/// engine (r23): with a `Wow6432Node\Probe` key present, `reg query HKCU\Software\Valve\Steam
+/// /reg:32` fails, and a registry link from `Wow6432Node\Valve` to `Software\Valve` brings it
+/// back and survives the server saving the hive again. In the reported environment the subtree
+/// came from an early Wine 11 engine's first boot (r7, 2026-09-29); moving a Wine 10 environment
+/// to r8 or r23 does not create it, but anything that writes such a key does.
+///
+/// The link goes into user.reg, so the repair runs only while no wineserver holds the
+/// environment, and only when the hive has the subtree, has Steam's keys and has no
+/// `Wow6432Node\Valve` of its own. It appends and never rewrites what is there.
+public enum SteamRegistryView {
+ /// The current user's key as Wine names it (the fixed SID of Wine's server/token.c).
+ static let userKey = #"\REGISTRY\User\S-1-5-21-0-0-0-1000"#
+
+ /// The text to append to a user.reg, or nil when the hive needs nothing.
+ static func linkBlock(for hive: String, now: Date = Date()) -> String? {
+ let subtree = hive.contains("\n[Software\\\\Wow6432Node]") || hive.contains("\n[Software\\\\Wow6432Node\\\\")
+ guard subtree, hive.contains("\n[Software\\\\Valve"),
+ !hive.contains("\n[Software\\\\Wow6432Node\\\\Valve]") else { return nil }
+ let target = userKey + #"\Software\Valve"#
+ let hex = target.utf16.flatMap { [UInt8($0 & 0xff), UInt8($0 >> 8)] }
+ .map { String(format: "%02x", $0) }.joined(separator: ",")
+ let lead = hive.hasSuffix("\n") ? "\n" : "\n\n"
+ return lead + "[Software\\\\Wow6432Node\\\\Valve] \(Int(now.timeIntervalSince1970))\n#link\n\"SymbolicLinkValue\"=hex(6):\(hex)\n"
+ }
+
+ /// Links the key in a stopped environment. True when it changed the hive.
+ @discardableResult
+ public static func repair(prefix: URL) throws -> Bool {
+ guard ProcessTable.liveServer(forPrefix: prefix) == nil else { return false }
+ let hive = prefix.appending(path: "user.reg")
+ guard let data = try? Data(contentsOf: hive),
+ let block = linkBlock(for: String(decoding: data, as: UTF8.self)) else { return false }
+ let handle = try FileHandle(forWritingTo: hive)
+ defer { try? handle.close() }
+ try handle.seekToEnd()
+ try handle.write(contentsOf: Data(block.utf8))
+ return true
+ }
+}
diff --git a/Sources/HighballKit/WineRunner.swift b/Sources/HighballKit/WineRunner.swift
index 05ab07e..cb8efac 100644
--- a/Sources/HighballKit/WineRunner.swift
+++ b/Sources/HighballKit/WineRunner.swift
@@ -286,11 +286,18 @@ public struct WineRunner: Sendable {
/// a link the Mac does not see), while `executable` still names the log and the checks.
@discardableResult
public func start(_ executable: URL, arguments: [String] = [], renderer: Renderer? = nil, extraEnvironment: [String: String] = [:], workingDirectory: URL? = nil, headerNote: String? = nil, program: String? = nil, onOutput: (@Sendable (String) -> Void)? = nil) async throws -> LaunchResult {
+ // First, while no server holds the hive: the syncs below start the environment's server.
+ let linkedSteamView = (try? SteamRegistryView.repair(prefix: bottle.url)) == true
await syncMacFontSubstitutes()
await syncDllOverridesRegistry()
await syncEngineAppDefaults()
await syncKeyboardRegistry()
var note = headerNote
+ if linkedSteamView {
+ let text = "linked HKCU\\Software\\Wow6432Node\\Valve to Software\\Valve so 32-bit lookups find Steam (Rockstar launcher error 113)"
+ onOutput?("note: \(text)")
+ note = [note, text].compactMap { $0 }.joined(separator: "; ")
+ }
// External Mac drives get letters of their own, so Steam can offer them for a library.
// Windows lists drives through Wine's mount manager, which reads the links when the
// environment's server starts: a letter linked while the server ran stayed unlisted until
diff --git a/Tests/HighballKitTests/SteamRegistryViewTests.swift b/Tests/HighballKitTests/SteamRegistryViewTests.swift
new file mode 100644
index 0000000..94bfbe2
--- /dev/null
+++ b/Tests/HighballKitTests/SteamRegistryViewTests.swift
@@ -0,0 +1,45 @@
+import XCTest
+@testable import HighballKit
+
+/// A user hive with a `Software\Wow6432Node` key sends Wine's 32-bit lookups of HKCU\Software
+/// into that subtree, so the Rockstar launcher could not see Steam (error 113, a player's Red
+/// Dead Redemption 2 environment moved off the Wine 10 engine, 2026-10-13).
+final class SteamRegistryViewTests: XCTestCase {
+ private let header = "WINE REGISTRY Version 2\n;; All keys relative to \\\\User\\\\S-1-5-21-0-0-0-1000\n\n#arch=win64\n"
+ private let steam = "\n[Software\\\\Valve\\\\Steam] 1790000000\n#time=1dd0000000000000\n\"ActiveProcess\"=dword:00000020\n"
+ private let subtree = "\n[Software\\\\Wow6432Node\\\\Microsoft\\\\Internet Explorer\\\\Main] 1790700450\n\"Start Page\"=\"https://www.winehq.org\"\n"
+
+ func testTheLinkGoesInOnlyWhenTheSubtreeAndSteamAreThere() throws {
+ XCTAssertNil(SteamRegistryView.linkBlock(for: header + steam), "no subtree, nothing is redirected")
+ XCTAssertNil(SteamRegistryView.linkBlock(for: header + subtree), "no Steam, nothing to link")
+ let block = try XCTUnwrap(SteamRegistryView.linkBlock(for: header + steam + subtree, now: Date(timeIntervalSince1970: 1_791_741_900)))
+ XCTAssertTrue(block.contains("\n[Software\\\\Wow6432Node\\\\Valve] 1791741900\n#link\n\"SymbolicLinkValue\"=hex(6):"))
+ XCTAssertNil(SteamRegistryView.linkBlock(for: header + steam + subtree + block), "a second run leaves it")
+ XCTAssertNotNil(SteamRegistryView.linkBlock(for: header + steam + "\n[Software\\\\Wow6432Node] 1790700450\n"),
+ "the bare key redirects too")
+ }
+
+ func testTheLinkNamesSteamsKeyInUTF16() throws {
+ let block = try XCTUnwrap(SteamRegistryView.linkBlock(for: header + steam + subtree))
+ let hex = try XCTUnwrap(block.components(separatedBy: "hex(6):").last?.trimmingCharacters(in: .whitespacesAndNewlines))
+ let bytes = hex.split(separator: ",").compactMap { UInt8($0, radix: 16) }
+ let units = stride(from: 0, to: bytes.count, by: 2).map { UInt16(bytes[$0]) | UInt16(bytes[$0 + 1]) << 8 }
+ XCTAssertEqual(String(decoding: units, as: UTF16.self), #"\REGISTRY\User\S-1-5-21-0-0-0-1000\Software\Valve"#)
+ }
+
+ func testRepairAppendsToAStoppedEnvironmentOnce() throws {
+ let prefix = FileManager.default.temporaryDirectory.appending(path: "hb-steamview-\(UUID().uuidString)", directoryHint: .isDirectory)
+ try FileManager.default.createDirectory(at: prefix, withIntermediateDirectories: true)
+ defer { try? FileManager.default.removeItem(at: prefix) }
+ let hive = prefix.appending(path: "user.reg")
+ let original = header + steam + subtree
+ try original.write(to: hive, atomically: true, encoding: .utf8)
+
+ XCTAssertTrue(try SteamRegistryView.repair(prefix: prefix))
+ let after = try String(contentsOf: hive, encoding: .utf8)
+ XCTAssertTrue(after.hasPrefix(original), "what was there is kept as it was")
+ XCTAssertTrue(after.contains("[Software\\\\Wow6432Node\\\\Valve]"))
+ XCTAssertFalse(try SteamRegistryView.repair(prefix: prefix), "already linked")
+ XCTAssertEqual(try String(contentsOf: hive, encoding: .utf8), after)
+ }
+}