Passing arguments to an alias based on putty

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm trying to create an alias for remote execution of a command, I've
managed to get it working nicely from within cmd.exe using the

doskey cmdalias="C:\Program Files\PuTTY\plink.exe" -l user server /bin/
command $*

(my actual command looks like this:
doskey cmdalias=chcp 28591 $T "C:\Program Files\PuTTY\plink.exe" -l
user server /bin/command $* $T chcp 850
but that is only to switch encoding before and after running the
command since the server is running iso-8859-1)

But since cmd.exe is 1. annoying to start 2. bad, I'd like to add
cmdalias.exe to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\App Paths" and have it run putty with the same command
remotely executed.

I've tried reading the putty manual and help-text and have found the -
m switch.

I've been unable however to use -m to execute my command because I
need the alias to take an argument.

In the doskey example I have $* which represents all arguments
supplied to the alias, but how to accomplish something similar with
putty I don't understand.

Is it possible to have putty receiving and argument to a remotely
executed command?

Site Timeline