Try a shortcut using;
"h:\Jriver24-64\Media Center 24.exe" /MediaServer
instead. Sure, you are supposed to use mc24.exe, but as no part of MC is running when you do this, "Media Center 24.exe" makes sense as well, and it accepts the parameter.
You need to provide more information about how you are launching a song from Windows Explorer. "Selecting a song straight from Windows File Explorer" doesn't tell me if you are;
Clicking on a song file and pressing Enter.
Double clicking on a song file.
Right-clicking on a song file and selecting "Play in Meda Center" or "Media Center > Play" or one of the other options.
Just clicking once on a song file in Windows Explorer has and never will start playback of that file, unless you have Windows set to treat a single click as a double click or something.
Also think about file associations, which are used by Windows to decide what program to launch when you open a file directly, by double-clicking on it for example. If you are using a Portable installation of MC, and there is no other version of MC installed on the hard drive of the PC, then Windows will not have any file association from the file type to the application.
Of course, you had MC24 installed on the PC before creating the Portable installation, and sometimes file associations don't get cleaned up as well as they should when MC is uninstalled, so you may still have some file associations, but they would be pointing... where? Normally to the Installed version of MC on the hard drive. But with that gone? I don't know. Check your file associations.
A this stage I lost hope and decided to launch media server through JRiver by using Tools>Option>Startup.
Do you mean you launched the Portable version of MC, with the Startup setting to run Media Server? Please confirm.
As you are starting the Portable version of Media Server, are you expecting the Media Center Windows Shell Integration to work? I don't think it will, as that would require the Shell Integration to be dynamically added and removed when the Portable version of MC is run, which would be an unreliable process.
The problem with this solution is that if the app is completely closed with no media server launched and I play a song externally(i.e. by selecting a song straight from Windows File Explorer) windows opens Media Center and plays the song
Which implies, almost certainly, that you have a version of MC, possibly an older version still there, installed on the hard drive, that is associated with the file type, and that version is launched and plays the file.
but if Media Center and/or Media Server are opened prior to selecting the song on Windows File Explorer windows opens JRiver Media Center but nothing gets played.
If you mean you already had the Portable version of MC24 running before double-clicking on the song file, then possibly the existing file association to the hard drive Installation of MC24 is trying to run that version, and just opens the Portable version because it can't find the hard drive Installation. That is a bit unlikely, but if you still have a hard drive Installation, with the file association, but started the Portable version, then double-clicked on the song file, the hard drive Installation would be started, and then you would have two copies of MC24 running... and the results would be unpredictable... which it seems they are.
Bottom line:
If you don't have a MC24 installation on the hard drive, I'm pretty sure, though not positive, that you won't have proper File Associations in Windows. I don't think the Portable installation would have File Associations, because once the Portable version is shut down and the USB drive removed, Windows won't have anything to launch on double-clicking a song file. The Portable version
may dynamically create File Associations each time it is launched, but that is highly unlikely.
Without proper File Associations in Windows, or a working Media Center Windows Shell Integration, pointing to the Portable installation of MC24, double-clicking on a song file will not launch MC and play the file.
You also need to check some settings if you want a file to play as described;
"Options > General > Behaviour > Double-click:"
"Options > General > Behaviour > Jump on play (audio):"
"Options > General > Behaviour > Start playing when files are added to Playing Now"
There may be other settings, or these settings may behave differently in a Portable installation.
PS: When I run the Media Server for a hard drive installed version of MC only using a shortcut, then double-click on a song file, the MC GUI is opened. It is only if I have opened both the GUI and Media Server, and minimised the GUI, that the file plays without opening the GUI. I'm not sure it used to do this, but it does now with MC24.
But if you have "Options > General > Interface > Minimise to System Tray" ticked, it doesn't really matter that the GUI is running, as it won't maximise on play.