Bring your entire GOG Galaxy library into Steam in minutes. GoG2Steam scans your GOG installs, finds the right executables (using GOG’s authoritative PlayTasks data), and writes polished, duplicate‑free non‑Steam shortcuts straight into Steam.
Why you’ll love it:
- One‑click import: Automatically discovers every installed GOG game
- Looks great in Steam: Clean names with optional prefixes/suffixes and consistent formatting
- Uses the right EXE: Leverages GOG PlayTasks (isPrimary=1) and smart fallbacks when needed
- Respects your setup: Preserves your existing non‑Steam shortcuts and avoids duplicates
- Safe by default: Backs up shortcuts.vdf (unless you opt out) and checks that Steam isn’t running
- Smooth UX: Interactive menu to pick your Steam user and tweak options, or run fully unattended
- Optional verification: Debug mode can read back the written file and show what’s inside
Make Steam your single launcher — keep friends, overlays, controller configs, and playtime tracking in one place.
- Existing shortcut records are preserved byte-for-byte, including AppIDs, custom icons, tags, launch arguments, working directories and other settings.
- Malformed or unsupported VDF input stops the import instead of being treated as an empty library. Keep your original file when reporting an unsupported format.
- Duplicate detection compares executable paths (case-insensitive) and launch arguments (case-sensitive). Existing names and settings remain unchanged; different games with the same name or shared launcher can coexist.
- Output is written to a temporary file in the destination directory, parsed for validation, then atomically replaces the destination. Failed validation leaves the destination unchanged. Failure to create a requested backup stops the run.
- Unattended runs refuse to close Steam unless
-ForceCloseSteamis supplied, and stop if Steam remains running. Steam is checked again before writing. - Dry runs skip Steam shutdown/relaunch, transcript creation and dependency installation. Install the SQLite dependency before previewing an import.
Run the standalone safety regression suite without Steam or GOG installed:
powershell.exe -NoProfile -File .\tests\Safety.Tests.ps1
# Or PowerShell 7:
pwsh -NoProfile -File ./tests/Safety.Tests.ps1The suite checks binary preservation, corrupt input, safe replacement, duplicate identity and the unattended process guard. Windows CI runs it on both PowerShell 5.1 and 7.
- Byte-for-byte preservation of existing
shortcuts.vdfrecords (non-EXE shortcuts, tags, icons, Unicode) - Safe atomic file replacement with temporary staging and backup validation
- Steam process guard re-verified prior to write to avoid Steam Cloud overwrite conflicts
- Explicit
-ForceCloseSteamrequired in unattended mode; stops if closure fails - Dry-run mode skips process changes, transcripts, and dependency installation
- Standalone safety regression test suite (PowerShell 5.1 and 7)
- Unified interactive options menu with numeric input and consistent Steam user selection
- Improved Steam shutdown workflow with escalation and manual close; clean cancel on 'q'
- Added end-of-run prompt to launch Steam in interactive mode
- Simplified Steam user labels to numeric IDs (with [MostRecent]) to avoid mislabeling
- Minor comment cleanup and transcript logging option
- Enhanced Executable Detection: Now uses GOG's PlayTasks database with
isPrimary = 1flag for authoritative executable detection - Existing Shortcuts Preservation: Added functionality to read and preserve existing Steam shortcuts before adding GOG games
- Duplicate Prevention: Intelligent merging system prevents duplicate entries when re-running the script
- Improved Validation: Added
IsGogAuthoritativeparameter to bypass utility pattern checks for GOG-verified executables - Better String Processing: Simplified Unicode character handling for better compatibility
- Enhanced VDF Generation: Added comprehensive VDF reading and merging capabilities
- Modular Architecture: Improved separation of concerns across function modules
- Reads GOG Galaxy's SQLite database (
galaxy-2.0.db) - Uses GOG's PlayTasks table to get authoritative executable information
- Reads existing Steam shortcuts to preserve them
- For each installed game:
- Uses GOG's
isPrimary = 1PlayTasks to get the correct executable - Extracts launch arguments from GOG's database
- Creates a Steam shortcut entry with proper tagging
- Uses GOG's
- Merges new GOG games with existing shortcuts (avoiding duplicates)
- Generates a valid shortcuts.vdf in Steam's userdata directory
- Backs up existing shortcuts.vdf before making changes
Quick start (interactive):
# Opens the menu to select Steam user and tweak options
pwsh -NoProfile -File .\GoG2Steam.ps1Unattended run (safe with pre‑checks and backup):
pwsh -NoProfile -File .\GoG2Steam.ps1 -NonInteractiveDry run (no file writes, full preview with optional debug):
pwsh -NoProfile -File .\GoG2Steam.ps1 -NonInteractive -DryRun -DebugVdfFilter and naming examples:
# Add a prefix to names and only import Sim titles
pwsh -File .\GoG2Steam.ps1 -NamePrefix '[GOG] ' -IncludeTitlePattern 'Sim|City'
# Exclude demos/betas and append a suffix
pwsh -File .\GoG2Steam.ps1 -ExcludeTitlePattern 'Demo|Beta' -NameSuffix ' (GOG)'All parameters:
-SteamPath <string>: Steam installation directory (default: Program Files (x86)\Steam)-GogPath <string>: GOG Galaxy installation directory (default: Program Files (x86)\GOG Galaxy)-GogDb <string>: Path to GOG Galaxy SQLite DB (default: ProgramData\GOG.com\Galaxy\storage\galaxy-2.0.db)-SteamUserId <string>: Target Steam user ID (numeric). If omitted, most‑recent user is selected automatically-SelectUser(switch): Show a user selector even if a default can be inferred (interactive mode)-NamePrefix <string>/-NameSuffix <string>: Text to add before/after each game title-IncludeTitlePattern <regex>/-ExcludeTitlePattern <regex>: Filter which titles are imported-NoBackup(switch): Skip creating a timestamped backup of shortcuts.vdf-SkipSteamCheck(switch): Don’t check/close Steam before writing (not recommended)-ForceCloseSteam(switch): Allow forced close in non‑interactive mode if Steam is running-NonInteractive(switch): Disable menus and run unattended with provided parameters-DryRun(switch): Don’t write files; combines well with-DebugVdfto preview results-LogPath <string>: Write a transcript log to this path-DebugVdf(switch): After writing, read back shortcuts.vdf and print a summary-DebugTitlePattern <regex>: When debugging, only print entries matching this pattern (default: SimCity)
- Windows 10/11
- PowerShell 5.1+
- GOG Galaxy installed with games
- Steam installed
- Intelligent Executable Detection: Uses GOG's own PlayTasks database for accurate executable identification
- Launch Arguments Support: Preserves GOG-specific launch parameters and arguments
- Existing Shortcuts Preservation: Safely merges with existing Steam shortcuts without data loss
- Duplicate Prevention: Smart detection prevents duplicate entries on subsequent runs
- Comprehensive Validation: Enhanced executable validation with GOG authority bypass
- Modular Design: Clean separation of database, validation, string processing, and VDF generation functions
- After writing, you’ll be prompted to launch Steam (interactive mode). Otherwise, restart Steam to see new shortcuts
- Existing non‑Steam shortcuts are preserved and merged intelligently — no duplicates
- Database and installation paths are auto‑detected in most setups
- Special characters in titles/paths are handled correctly
- Re‑running the script is safe; it will only add new games
- Launch arguments from GOG Galaxy are preserved in Steam shortcuts
- Byte-for-byte preservation of existing
shortcuts.vdfrecords, including non-EXE shortcuts, AppIDs, custom icons, tags, launch arguments, and Unicode names - Standalone safety regression test suite (
tests/Safety.Tests.ps1) covering binary preservation, corrupt input rejection, atomic replacement, and process safety - Windows CI workflow testing both Windows PowerShell 5.1 and PowerShell 7+
- Output is written to a temporary file, validated by parsing, and then atomically replaces the destination
- Duplicate detection now matches by executable path and launch arguments, preserving existing custom configurations
- Unattended mode requires explicit
-ForceCloseSteamconsent and halts execution if Steam remains active - Steam process status is re-verified immediately prior to file replacement to prevent Steam Cloud overwrite conflicts
- Dry runs skip Steam process shutdown/relaunch, transcript logging, and dependency installation
- Removed duplicate and incomplete VDF reader implementation in favor of recursive typed VDF map parser (
Read-VdfMap)
- Unified interactive options menu with numeric input
- End-of-run prompt to launch Steam (interactive mode)
- Improved Steam shutdown workflow (graceful -> stop -> force -> taskkill -> manual) with clean cancel
- Simplified Steam user labels to numeric IDs (with [MostRecent])
- Consistent interactive Steam user selection using the same menu style
- Clean cancellation path on manual-close prompt ('q' exits with message and non-zero code)
- Minor comment cleanup and documentation updates
- PlayTasks Integration: Now uses GOG Galaxy's PlayTasks database with
isPrimary = 1for authoritative executable detection - Existing Shortcuts Preservation: Added
Read-ExistingShortcutsfunction to preserve existing Steam shortcuts - Smart Merging: New
Merge-GameShortcutsfunction prevents duplicate entries - Launch Arguments: Full support for GOG-specific command line arguments
- Enhanced ExecutableValidation: Added
IsGogAuthoritativeparameter to bypass utility filters for GOG-verified executables - Improved String Processing: Simplified Unicode character replacement for better compatibility
- VDF Generation: Comprehensive rewrite with existing shortcuts reading and merging capabilities
- Database Functions: Enhanced SQL queries for better game detection and metadata extraction
- Fixed Unicode character handling in game titles
- Improved path validation and normalization
- Better error handling for missing GOG database entries
- Enhanced executable validation for edge cases
- Fixed Unicode character encoding issues in verbose output (August 3, 2025)
For VDF format details, see Steam VDF Generator documentation below.
A PowerShell module that generates Steam's non-Steam game shortcuts in the binary VDF (Valve Data Format) file format. This implementation:
- Accurately replicates Steam's shortcuts.vdf binary format
- Handles all required fields (appname, exe, StartDir, etc.)
- Properly formats binary fields like "hidden"
- Supports tags for game categorization
- Maintains null terminators and type markers according to spec
The script implements Steam's binary VDF format for shortcuts:
- String values (0x01): Written as UTF-8 with null terminator
- Binary values (0x02): Written with length prefix and null terminator
- Maps: Marked with 0x00 start and 0x08 end bytes
- Special fields: "hidden" as binary, "tags" as nested map
- Fields ordered as per Steam's expectations
$entries = @(
@{
Name = "My Game"
ExePath = "C:\Games\MyGame.exe"
StartDir = "C:\Games"
}
)
Build-ShortcutsVdf -Entries $entries -OutputFilePath "shortcuts.vdf"Write-VdfString: Writes strings in VDF format with proper null terminationGet-SHA1Hash: Helper for CRC-based AppID generationGet-AppId: Generates unique AppIDs matching Steam's formatBuild-ShortcutsVdf: Main function for creating shortcuts.vdf
Use test-vdf.ps1 to verify correct binary output:
.\test-vdf.ps1The codebase has been significantly enhanced with better separation of concerns:
- DatabaseFunctions.ps1: Enhanced with PlayTasks queries and existing shortcuts reading
- ExecutableValidation.ps1: Added authoritative validation bypass for GOG-verified executables
- StringProcessing.ps1: Simplified Unicode handling for better cross-platform compatibility
- VdfGeneration.ps1: Comprehensive rewrite with merging and duplicate detection capabilities
- Database Integration: Enhanced SQL queries leverage GOG's PlayTasks table with
isPrimary=1filtering - Preservation Logic: New VDF binary reader preserves existing Steam shortcuts
- Merging Algorithm: Intelligent path and name-based duplicate detection
- Error Handling: Improved robustness with better exception handling and logging
- Validation Logic: Context-aware executable validation with GOG authority bypass
- File format matches official Steam client behavior
- Handles empty strings and binary data properly
- Preserves exact byte sequence required by Steam
- Generated files can be read by Steam client
This project is licensed under the MIT License - see the LICENSE file for details.
Based on analysis of Steam's shortcuts.vdf format and C# reference implementation.
Additional assistance and iteration provided by:
- Agent Mode (Warp AI terminal) for repo automation, conflict resolution, and scripting assistance
- Claude Sonnet 4 for UX refinements to the interactive menu and shutdown flow
- OpenAI GPT-4 for implementation guidance and code review suggestions
If GoG2Steam helped organize your game library or saved you manual setup time, consider supporting ongoing development: