If you haven’t seen part one of topic, check that out here. Essentially, there are times in your X3 life where you’ll want to verify who is in the system for sure. Part one showed you how to do that from the console. You can also do that calling the PSADX program from outside of X3 directly through s command prompt batch script. You’ll have to first set up your environment variables using the env.bat file. Once you do that though it’s gravy from there on out.
Below, I’ve created some code for you that will show you how to create a log file with the active users in X3 right now. I know consultants who use this technique for troubleshooting situations where the batch server won’t start (trying to figure out if anyone is logged in already) or there is any anomaly with the logging into X3. Anyways, without further ado, here’s the batch file code:
@echo off Echo Set Variables
Echo Run %myDir%\bin\env.bat Echo Run psadx -afghimopx >%USERPROFILE%\myActiveUsers.log Echo launching log file: %USERPROFILE%\myActiveUsers.log |
To leverage this code, create a new text file, copy the code above into the file and name the file getActiveX3Users.bat. This file needs to exist on the same server where the env.bat file exists, so most likely on your application server. If everything is set up correctly, when it is run, a new file will open up with a list of the users, which looks something like this:
Enjoy!