SkylineCmd.exe is intended to be used with the "Administrator Install" of Skyline. You use it when you know which folder Skyline was installed in. SkylineCmd.exe finds the "Skyline.exe" or "Skyline-Daily.exe" which is in its own folder, and uses that installation of Skyline to perform your command.
"SkylineRunner.exe" is used when you have a regular install of Skyline. Regular Skyline installs itself in some weird directory somewhere under the "AppData" folder in your home directory. "SkylineRunner.exe" looks in your Start Menu and figures out where Skyline got installed.
I cannot tell which arguments you are passing to which program, so I cannot tell you why you are seeing the error about "--refine-max-peptide-peak-rank". I believe that argument is supposed to be followed by a number, and if it's just the last argument on the command line, you will get the "Unexpected argument" error.
There are some other errors in your output that I can tell you about.
When you see the error "The document format version 4.21 is newer than the version 4.2 supported by Skyline (64-bit)", that error is coming from the Administrator install of Skyline. That is, you are probably running "C:\Program Files\Skyline\SkylineCmd.exe". The Administrator install of Skyline describes itself as "Skyline (64 bit)", unlike the regular SkylineRunner.exe, which would say something like "Skyline (64-bit) 220.127.116.1109". (It was not our intention that there would be a difference here-- I'll look into fixing it so that the Administrator install of Skyline tells you its full version number).
That error is telling you that the document was created using Skyline-Daily (version 4.21), and you cannot read it with regular Skyline 4.2.
The next error that you get is:
Error: Unable to find Skyline program at any of the following locations: ...
This error is coming from running "SkylineRunner.exe", and it seems that you do not have regular Skyline installed on your computer.
I hope this helps you figure out what is going on. It looks like you are running a program that you have written called "PeptideQuanRunner.exe", and that that program is doing its job by calling out to SkylineCmd.exe and SkylineRunner.exe. You will probably need to go back to the source code that was used to create PeptideQuanRunner.exe in order to figure out what it is supposed to be doing.