ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

passing parameters to .exe and .bat

(1/2) > >>

burro:
New convert here, from... well, some "other tool" :).  Really enjoying the flexibility that FARR is giving me!

Got a quick question.  What is the best way to call a program (be it .exe or .bat or .whathaveyou) with some parameters that I type?  For instance:

%SystemRoot%\System32\mstsc.exe /v:%1

I've tried to make an alias that looks like this:

match on: ^rd (.*)
Run: Remote Desktop | %SystemRoot%\System32\mstsc.exe /v:$$1

But that doesn't seem to do the trick.  I seem to have a lot of other .exe programs that I run on a regular basis that take parameters.  How can I do this?  Been looking around in the forum and on the docs, but I must be blind.

Thanks a ton.  Awesome tool!  Hopefully will be giving some scripts back to the community soon.

mouser:
three things:

First, welcome!

Second, that alias you specified should work fine -- i think it's important for you/me/us to figure out why its not working properly if it isnt.  Can you tell me any more symptoms, like is it launching the program but without arguments, or not launching it at all.

Third, people have been requesting an easier way to pass parameters to a tool for a while now, and i think it's time for me to add it.  The idea that i think we settled on for how to do this is to allow some way to express on the search line that you want to pass extra paramaters to the launched program, like: "search terms :: param1 param2"  that would tell far that whatever you type after the :: should be passed as commandline parameters.  Thoughts?

kartal:
My suggestions

"searchterm tab arguments."
"searchterm > arguments."
"searchterm | arguments."



burro:
Well, seems like the machine needed a restart :(  I haven't changed anything and the alias does work as expected, as in, it does bring up the Remote desktop tool with the appropriate machine.

I like your idea of having some sort of string that can be used to specify arguments.  Personally, I have a lot of these programs that I need to pass parameters to, and making an alias for each of them has been a bit annoying.  I have managed to make it work though.  I'm wondering if making the string be "$$" instead of "::" would make it more obvious, as "$$" is already used as a prefix to the parameters.

Thanks for the quick response!

d4ni:
I am in favor of the pipe character, |, to split search terms from arguments. It just looks nice, as in it really splits the right and left part, so program from parameters :)

Navigation

[0] Message Index

[#] Next page

Go to full version