Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been making shortcuts to thing I use often so I don't have a cluttered taskbar. I have shortcuts for games, thunderbird, etc, and just type winkey+r tb for thunderbird or winkey+r wa x^2+2x+3 dx to search wolfram alpha.

I've tried passing arguments through shortcuts, for example this is one I got to work:

Shortcut name: wa Shortcut target: C:..\chrome.exe "

I wish I could do %1, because it does put a space in there and I can't get this one working:

Shortcut name: kill Shortcut target: taskkill /IM "

The shortcuts for some reason don't want to keep the arguments

So after shortcuts started failing me, I wanted to try bat files, but I needed to hide them. So I tried the vb script that a lot of people use. The only problem is that I have to use a batch file to start the other batch file invisibly, thus making it useless. If I try to start it with a shortcut, the arguments don't come up!

Does anyone have a solution to this?

share|improve this question
up vote 1 down vote accepted

Use start in a batch file to run another program non-blocking (so your batch file will terminate and the windows will close afterwards).

You should be able to use %1, but this will only pass the first argument. Use quotes if you need to pass arguments containing spaces, but you could be needed to remove them when calling other programs. For use with URLs you probably will have to encode the URL before passing it (eg. in your wolfram alpha shortcut).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .