That command-line parameter does the same thing as the COM method. It opens the source file in its associated application, prints the file, then closes the application.
So in the case of XPS files, XPS Viewer is launched with the source file, then the Print command is invoked. Same case holds true though - the Choose Printer dialog appears and waits for you to click Print.
I think the solution to this might be to get a different XPS viewer application.
I can open the files in IE or in the “Reader” app in Win 10, but when I try to execute my COM script, it gives me the following error, even though I have correctly associated the XPS extension with IE/Reader …
That error ^ is caused by the ShellExecute() function in the script, which attempts to open a file using the associated application…
objShell.ShellExecute(filename,"", "", "print", 2);
Using the command line parameter after associating .xps to IE gives this error …

