I don't know of a command to open a query window on the desktop via a command, and not with /window.
If you enable the option I said, and press 'OK' then you can just type
/query nickname and the window will open on the desktop, it just requires activation of that function...why can you not use ALT+O?
I
think if you change the mirc.ini file to say:
wquery=140,851,140,477,0,1,1 under [window] (use CTRL+F) then it might change the options accordingly without having to use ALT+O...might be useful for a script and the like.
There might well be a scripting way to do it, but if there is I don't know it, keep checking back to see if some other clever person has posted

Regards,