Environment
- IBC version: 3.23.0
- OS: Microsoft Windows Server 2025 Standard 10.0.26100 64‑bit
- IBKR Gateway: Build 10.45.1e, May 7, 2026 5:00:06 AM (from Help → About IB Gateway)
- Gateway install path:
C:\Jts\ibgateway\1045
Goal
Run IB Gateway 10.45.1e under IBC 3.23.0 (paper account) on a Windows Server 2025 VPS, using the standard StartGateway.bat and StartIBC.bat from the IBCWin‑3.23.0 ZIP.
Symptom / Error
When I run StartGateway.bat, IBC starts and then exits with ERRORLEVEL = 1007 and an error saying neither tws.vmoptions nor ibgateway.vmoptions can be found, even though ibgateway.vmoptions is present in the version directory.
Console window:
==============================================================================
IBC version 3.23.0
Running GATEWAY 1045 at Thu 05/14/2026 8:21:55.20
'wmic' is not recognized as an internal or external command,
operable program or batch file.
Diagnostic information is logged in:
C:\Users\Administrator\Desktop\sec_reports\IBCWin-3.23.0\Logs\IBC-3.23.0_GATEWAY-1045_.txt
** Caution: closing this window will close GATEWAY 1045 **
(window will close automatically when you exit from GATEWAY 1045)
==============================================================================
**** An error has occurred ****
Error while: Running StartIBC.bat
ERRORLEVEL = 1007
Please look in the diagnostics file mentioned above for further information
==============================================================================
Relevant part of the IBC log:
Starting IBC version 3.23.0 on Thu 05/14/2026 at 8:21:55.63
Operating system: Microsoft Windows Server 2025 Standard 10.0.26100 64-bit
Arguments:
TWS version = 1045
Program = Gateway
Entry point = ibcalpha.ibc.IbcGateway
/TwsPath = C:\Jts\ibgateway
/TwsSettingsPath = C:\Jts\ibgateway\1045
/IbcPath = C:\Users\Administrator\Desktop\sec_reports\IBCWin-3.23.0
/Config = C:\Users\Administrator\Desktop\sec_reports\IBCWin-3.23.0\config.ini
/Mode = paper
/JavaPath =
/User =
/PW =
/FIXUser =
/FIXPW =
"C:\Jts\ibgateway\1045\tws.vmoptions" does not exist
=========================== An error has occurred =============================
Error: Neither tws.vmoptions nor ibgateway.vmoptions could be found
Filesystem state (Gateway install)
The Gateway install directory looks like this:
C:\Users\Administrator>dir C:\Jts\ibgateway\1045
Directory of C:\Jts\ibgateway\1045
05/14/2026 07:56 AM <DIR> .
05/14/2026 07:53 AM <DIR> ..
05/14/2026 07:54 AM <DIR> .install4j
05/14/2026 07:53 AM <DIR> data
05/08/2026 03:11 AM 795,320 ibgateway.exe
05/14/2026 07:54 AM 915 ibgateway.vmoptions
05/14/2026 07:54 AM <DIR> jars
05/14/2026 08:24 AM 656 jts.ini
05/14/2026 08:24 AM 63,394 launcher.log
05/14/2026 08:24 AM <DIR> lbmfdjllphoapbfmiajjdedkhjpcekhpghandhfj
05/08/2026 03:11 AM 928,952 uninstall.exe
05/14/2026 08:24 AM 3,120 xmlopt.dat
6 File(s) 1,792,357 bytes
6 Dir(s) 58,554,556,416 bytes free
And specifically:
C:\Users\Administrator>dir C:\Jts\ibgateway\1045\*.vmoptions
Directory of C:\Jts\ibgateway\1045
05/14/2026 07:54 AM 915 ibgateway.vmoptions
1 File(s) 915 bytes
So ibgateway.exe, ibgateway.vmoptions, jars, etc., are all present in the folder that IBC is pointing at (C:\Jts\ibgateway\1045).
IB Gateway 10.45.1e starts and runs correctly when launched directly via:
C:\Jts\ibgateway\1045\ibgateway.exe
The problem occurs only when launching via StartGateway.bat → DisplayBannerAndLaunch.bat → StartIBC.bat.
My IBC configuration
StartGateway.bat (header section, from IBCWin‑3.23.0, with my edits):
@echo off
setlocal enableextensions enabledelayedexpansion
set TWS_MAJOR_VRSN=1045
set CONFIG=C:\Users\Administrator\Desktop\sec_reports\IBCWin-3.23.0\config.ini
set TRADING_MODE=paper
set TWOFA_TIMEOUT_ACTION=restart
set IBC_PATH=C:\Users\Administrator\Desktop\sec_reports\IBCWin-3.23.0
set TWS_PATH=C:\Jts\ibgateway
set TWS_SETTINGS_PATH=C:\Jts\ibgateway\1045
set LOG_PATH=%IBC_PATH%\Logs
set TWSUSERID=
set TWSPASSWORD=
set FIXUSERID=
set FIXPASSWORD=
set JAVA_PATH=
set HIDE=
config.ini (relevant parts):
FIX=no
IbLoginId=...redacted...
IbPassword=...redacted...
TradingMode=paper
AcceptNonBrokerageAccountWarning=yes
LoginDialogDisplayTimeout=60
;IbDir=
StoreSettingsOnServer=
MinimizeMainWindow=no
ExistingSessionDetectedAction=primaryoverride
AcceptIncomingConnectionAction=accept
;CommandServerPort=7462
CommandServerPort=0
SuppressInfoMessages=yes
I am following the User Guide’s recommendations:
- Installed the standalone/stable IB Gateway build.
- Used the default
C:\Jts\ibgateway\ root.
- Set
TWS_MAJOR_VRSN based on the build number (10.45.1e → 1045).
- Set
TWS_PATH to C:\Jts\ibgateway.
- Set
TWS_SETTINGS_PATH to C:\Jts\ibgateway\1045.
- Commented out
IbDir in config.ini so the settings folder is controlled via TWS_SETTINGS_PATH instead.
What I expected
Given this layout, I expected StartIBC.bat to:
- Resolve
PROGRAMPATH to C:\Jts\ibgateway\1045,
- Find
ibgateway.vmoptions there,
- Use it (or fall back correctly) to build the Java VM options,
- Then start Gateway under IBC control.
Instead, the log shows:
- It looks in
C:\Jts\ibgateway\1045\tws.vmoptions,
- Then reports that neither
tws.vmoptions nor ibgateway.vmoptions could be found,
- And exits with error 1007.
This is surprising given that C:\Jts\ibgateway\1045\ibgateway.vmoptions exists and is readable.
Questions
- Is there any known issue in the
StartIBC.bat VM options discovery logic with IB Gateway 10.45.x on Windows Server 2025?
- For Gateway, should the script be using
ibgateway.vmoptions by default, and could there be a path/quoting issue that causes the if exist checks to fail even when the file is present?
- Is there a recommended workaround (for example copying or renaming
ibgateway.vmoptions to tws.vmoptions, or a small modification to StartIBC.bat) until the scripts are updated?
I’m happy to provide the full log file and test any script changes you suggest.
Environment
C:\Jts\ibgateway\1045Goal
Run IB Gateway 10.45.1e under IBC 3.23.0 (paper account) on a Windows Server 2025 VPS, using the standard
StartGateway.batandStartIBC.batfrom the IBCWin‑3.23.0 ZIP.Symptom / Error
When I run
StartGateway.bat, IBC starts and then exits with ERRORLEVEL = 1007 and an error saying neithertws.vmoptionsnoribgateway.vmoptionscan be found, even thoughibgateway.vmoptionsis present in the version directory.Console window:
Relevant part of the IBC log:
Filesystem state (Gateway install)
The Gateway install directory looks like this:
And specifically:
So
ibgateway.exe,ibgateway.vmoptions,jars, etc., are all present in the folder that IBC is pointing at (C:\Jts\ibgateway\1045).IB Gateway 10.45.1e starts and runs correctly when launched directly via:
The problem occurs only when launching via
StartGateway.bat→DisplayBannerAndLaunch.bat→StartIBC.bat.My IBC configuration
StartGateway.bat(header section, from IBCWin‑3.23.0, with my edits):config.ini(relevant parts):I am following the User Guide’s recommendations:
C:\Jts\ibgateway\root.TWS_MAJOR_VRSNbased on the build number (10.45.1e→1045).TWS_PATHtoC:\Jts\ibgateway.TWS_SETTINGS_PATHtoC:\Jts\ibgateway\1045.IbDirinconfig.iniso the settings folder is controlled viaTWS_SETTINGS_PATHinstead.What I expected
Given this layout, I expected
StartIBC.batto:PROGRAMPATHtoC:\Jts\ibgateway\1045,ibgateway.vmoptionsthere,Instead, the log shows:
C:\Jts\ibgateway\1045\tws.vmoptions,tws.vmoptionsnoribgateway.vmoptionscould be found,This is surprising given that
C:\Jts\ibgateway\1045\ibgateway.vmoptionsexists and is readable.Questions
StartIBC.batVM options discovery logic with IB Gateway 10.45.x on Windows Server 2025?ibgateway.vmoptionsby default, and could there be a path/quoting issue that causes theif existchecks to fail even when the file is present?ibgateway.vmoptionstotws.vmoptions, or a small modification toStartIBC.bat) until the scripts are updated?I’m happy to provide the full log file and test any script changes you suggest.