Discussion Locked

shortcut needs variable

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to create a shortcut for users that will call a batchfile, but need a variable to be added (how) for the batchfile to use?
In other words, I would like the shortcut to prompt the user for the variable before proceeding with the batchfile.Any guidance welcome - Thanks!

5 replies

by ped

i don't know of any way to add a prompt to a shortcut but you could create to second batchfile that will prompt for a variable and use the shortcut to this file and have this variable passed on.

by beermonster

If the variable is a system variable, then you can pass it as a parameter in the target field on the shortcut. Adding another batch file as the previous respondent suggests does't really achieve anything that prompting in your original batch file wouldn't do. if there are a set list of variables that the user could choose from then try choice.exe from the reskit. Otherwise, if the variable will always be changing, I suggest you prompt via a vbscript - far easier than it might sound.

This discussion is closed to new replies.