The Steam DRM wrapper is an important part of Steam platform because it verifies game ownership and ensures that Steamworks features work properly by launching Steam before launching the game.
Automated Steam DRM Wrapper
The Steam wrapper can be applied from within your SteamPipe upload script. This performs an initialization request to the Steam servers via the logged in client, then posts your plaintext executable to the Steam back end via HTTP. The wrap is performed server side, and then steamcmd downloads the wrapped executable.
To perform a DRM wrap with SteamPipe, have your script login and then run the drm_wrap Steam command:
drm_wrap [appid] [input filename] [output filename] [toolname] [flags]
- appid - Your numeric application ID
- input filename - Relative or absolute path to input plaintext executable. Remember to quote paths that may contain spaces!
- output filename - Relative or absolute path where the tool will write the output wrapped executable.
- toolname - "drmtoolp" for the new portable tool. "drmtool" for old legacy win32 tool.
- flags - Bitmask of the following numeric flags specifying tool behavior.
- 0 - Normal wrap (most protection)
- 6 - Compatibility mode (Disables Steam DRM )
- 32 - Skip debugger check
- 38 - compatibility mode and also skip debugger check (least protection)
Example run_build.bat script to login, apply DRM, build and upload the build to Steam (where App ID is 480):
builder\steamcmd.exe +login mysteamaccount mysteampassword +drm_wrap 480 "D:\src\steamworkssdk\steamworksexample\release\steamworksexample.exe" "D:\src\steamworkssdk\tools\ContentBuilder\content\windows_content\SteamworksExample.exe" drmtoolp 0 +run_app_build ..\scripts\app_build_480.vdf +quit
Manual Steam DRM Wrapper
To quickly wrap an exe with the Steam wrapper use the Steamworks App Data Admin page to wrap the primary game exe.
- Select the game you want to add DRM to on your App Admin page
- Select Edit Steamworks Settings in the Technical Tools Section of the App Admin page
- From the Security Tab, select DRM.
- Upload the primary game exe - See the automated wrapper section above for more information on the tool execution options.
- Download the exe back to your local machine
- Rename the exe back to the original name
- Copy it to the source location for your Content Tool depots
- Build a new version of your depot
- Test that depot on your local content server
Using the Steam Wrapper with Other DRM
The Steam wrapper can and should be used in combination with other DRM solutions. To do so, apply the Steam wrapper in compatibility mode first before applying any other DRM. Apply it first so that it does not interfere with the DRM solution. Compatibility mode will disable DRM capabilities of the wrapper.
Submit the exe in compatibility mode by either selecting it in the drop down on the Steamworks page or using the appropriate flags in the automated drmtool.
Frequently Asked QuestionsQ. My C# / .Net game doesn't run after applying the Steam wrapperA.
The Steam wrapper doesn't support .Net applications. Instead of using the DRM wrapper, use SteamAPI_RestartAppIfNecessary
.My game doesn't run after applying the Steam DRM wrapperA.
The Steam wrapper can break other DRM tools. See Using the Steam Wrapper with Other DRM
, as there may be a conflict.Do I need to apply DRM to my exe every time I make a new build?A.
Yes, each build you intend to publish needs to be wrapped with the Steam wrapper. Try automating it using the Automated Steam Wrapper process documented above.