@vignesh.s, you are correct that removing the nogui flag should make it so FlexSim will be displayed when running the batch file.
With only that change, the software still runs the model when the batch file is executed, but it might be running so fast that you don't see the model running. This is because script.txt is using the runspeed() command to set the run speed to 10000. If you remove that line in the script file, or change it to something else like runspeed(4);, then you should see the model run at a more easily seen speed.
Also, the test.fsm model uses FlexScript to stop the model run at a certain point, create/modify the results.txt file, then close the FlexSim software. I believe this is all done in a Sink's On Entry trigger, probably when a specified amount of flowitems enters the Sink. You can try modifying that trigger so the model doesn't automatically close and you can still look through the model even after it is stopped.