maybe you can use command line inputs

aka: /run "c:\bla bla\script.pm" some extra inputs here

and then use stdio.dll if you want to hide the console (msdos) window