in menu File > File Options
check Perform script: and specify the script to be executed at open
what you're wanting is a server-side script , I don't have any personal experience, but suggest you search this forum for such terms
If you start just the application "FileMaker" there is not specify which db (file) to run and a user has to manually open the DB they want.
otherwise you create a dummy db with performing script at start that open your file.
then you distribute this dummy file and the users have to open this file
in the same script you can even close this dummy file