Here is a VBA macro that uses Windows APIs to gather the command line commands when starting SolidWorks from that command line. The format for starting SolidWorks from a command line and running a macro on startup is like this:
...\sldworks.exe /m ...\macro.swp
where..\ describes the file path of SolidWorks and the macro itself. The macro name needs to be modified also for your specific situation. This would allow a user to use custom command line switches (flags). Note that /m is required to run a macro on command line startup and any custom switches should come after the full command shown above so it is parsed properly..
Just run the attached macro from a command line and it will produce a msgbox with the full command line command.
Thanks.