‐ 5 How to use switchres to launch games - Redemp/VideoAmp_wiki GitHub Wiki
Launch and switch resolution
Example on how to Launch switchres, switch resolution & force resolution and then finally launch a game using bat files in windows.
- Make a simple txt file. Rename the txt file to .bat when done.
@echo off
REM Change to the directory of the game
cd "C:\Program Files (x86)\Steam\steamapps\common\Andro Dunos II"
REM Start switchres.exe with the specified arguments
switchres.exe 320 240 60 -f 320x240@60 -i C:\ini\switchres.ini -s -l "\"C:\Program Files (x86)\Steam\steamapps\common\Andro Dunos II\andro dunos ii.EXE\""
Launch and switch resolution, wait then switch again
Example on how to Launch switchres, switch resolution & force resolution, launch a game, wait 20 seconds, switch resolution again.
For games like
- Teenage Mutant Ninja Turtles: Shredders Revenge
- Shadow of the Ninja - Reborn
- Fallen Leaf
Just to name a few.
- Make a simple txt file. Rename the txt file to .bat when done.
@echo off
REM Change to the directory of the game
cd "C:\Games\KAGE Shadow of the Ninja"
REM Set the initial resolution to 480x270 using switchres
c:\ini\switchres.exe 480 270 60 -f 480x270@60 -i C:\ini\switchres.ini -s
REM Start the game in a separate process
start "" "\""C:\Games\KAGE Shadow of the Ninja\KAGE Shadow of the Ninja.exe\""
REM Wait for 20 seconds before switching resolution
timeout /t 20 /nobreak >nul
REM Switch resolution to 480x240 after 20 seconds
c:\ini\switchres.exe 480 240 60 -f 480x240@60 -i C:\ini\switchres.ini -s
REM Optional: Wait for user input before closing the command window
REM pause
- Example 2
@echo off
REM Change to the directory of the game
cd "C:\Games\KAGE Shadow of the Ninja"
REM Start the game with switchres and launch it in a separate process
start "" c:\ini\switchres.exe 480 270 60 -f 480x270@60 -i C:\ini\switchres.ini -s -l "\"C:\Games\KAGE Shadow of the Ninja\KAGE Shadow of the Ninja.exe\""
REM Wait for 20 seconds before switching resolution
timeout /t 20 /nobreak >nul
REM Switch resolution to 480x240 after 20 seconds
c:\ini\switchres.exe 480 240 60 -f 480x240@60 -i C:\ini\switchres.ini -s
REM Optional: Wait for user input before closing the command window
REM pause
- Notes
In batch scripts, parentheses are special characters used for grouping commands, and spaces can cause confusion when the path isn't properly handled.
You can fix this by correctly enclosing the entire path in quotes, ensuring it handles both spaces and special characters properly.
Here's the correct command:
start "" "C:\Program Files (x86)\Steam\steamapps\common\KAGE Shadow of the Ninja\KAGE Shadow of the Ninja.exe"
Another example is special characters like &, #, @, and $ in file paths or file names in batch scripts, you need to handle them carefully because certain characters (like &) have special meaning in the command line.
Example
Pampas & Selene
becomes
Pampas ^& Selene