Closed timborden closed 5 months ago
No you don't need to change that, TWS 10.23 installs in exactly the same way as all the other versions for the past few years.
I suspect that you've got
set TWS_PATH=%SYSTEMDRIVE%\Jts\1023
in your StartTWS.bat
. It should just be:
set TWS_PATH=%SYSTEMDRIVE%\Jts
Hey @rlktradewright, thanks for the quick response.
I installed TWS in the user folder as we're planning/hoping for multiple users to use the same Windows instance (with multiple TWS instances):
.....and we edited the StartIBC.bat
to reference the installation location:
As you can see from the screenshot, the tws
folder doesn't include a 1023
subdirectory.
I just installed it in my user folder and it's fine.
The short answer is that you should have told it to install into %USERPROFILE%\TWS\1023.
The thing is that the TWS installer installs the particular version of TWS in the folder specified in the installer user interface. When you run the installer, the offered location includes the version directory. IBC scripts depend on TWS being installed in a version-specific folder. So if you want to install it somewhere else, you have to make sure you include the version specific folder is still incuded in the installer's UI.
The value of TWS_PATH in the start script doesn't include the version folder, because the script can deduce the version folder location by using the TWS_MAJOR_VRSN. This arrangement means that to switch to a different installed version, you only have to change TWS_MAJOR_VRSN.
So perhaps I should add a comment to TWS_PATH saying that this is the base folder where all the different installed versions of TWS are held. I haven't done so because if you use the default install location you don't have to think about this at all (and before TWS 980, which was back in 2020, the TWS installer didn't give you the option of installing to a different folder - it always just plonked it in %SySTEMDRIVE%/Jts).
And as the existing comment says, there are virtually no good reasons for installing anywhere other than the default. In particular, I don't understand why you feel it necessary to install TWS to the user folder for each intended user. This is completely unnecessary. You can run multiple instances of TWS for different users from the same folder (at the same time, if required - though obviously only one user can actually be interacting with the computer at any given moment).
In this multiple user scenario, you obviously need to have separate start scripts and config.ini for each user (which you could conveniently hold in the relevant user's Documents folder tree). You also need to make sure that the LOG_PATH is different for each user, but again you can store the logs in the users' Documents folder tree to ensure that.
Just a possible gotcha with the multiple user scenario, when sharing the same TWS installation. It's safest to also set TWS_SETTINGS_PATH to something unique for each user - perhaps, again, store the settings in the users' Documents tree. Alternatively ensure that different users have different settings for the AutoRestart time.
The reason for this is that when TWS auto-restarts, the IBC script has to detect the location of the autorestart file created by the TWS instance just before it restarts, and if there is more than one such file (which can happen if two or more TWSs with the same TWS_SETTINGS_PATH restart at the same time) IBC cannot proceed.
Thanks for the detailed response @rlktradewright!
Admittedly, I'm not an expert when it comes to Windows users....the extra context is helpful.
Just an FYI.....we're running Windows Server 2022 on a cloud instance with the intention of having multiple users accessing it at once.....not sure if that changes things.
I'll create a 1023
directory and move the files into that directory and undo the changes I made to StartIBC.bat
Thanks again!
More than 2 simultaneous interactive sessions to a Windows Server needs special considerations. See:
https://inab818.site/en/microsoft-windows-server-2022/windows2022-english-multiple-people-remote-desktop/ https://learn.microsoft.com/en-us/answers/questions/761022/3-users-simultaneously
For anyone who got here from issues with missing version folder after headless/non-gui install (i.e. using -q
flag),
try additionally adding the -dir
flag, e.g.
./tws-stable-standalone-linux-x64.sh -q -dir /Jts/stable
The default install location for recent TWS releases will be $HOME/tws or /usr/local/tws if -dir
flag is not specified.
Note that your version folder can be arbitrary text like "stable" or "latest". It doesn't have to be the actual number. Just provide the text name anywhere "major version number" is asked for.
Just an FYI....I need to change this line:
https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/StartIBC.bat#L268
...to:
...to get IBC to work with TWS 10.23