Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 "http://www.wolframalpha.com/input/?i=

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.