Configure a Windows shortcut to prompt for input

In previous versions of Windows, in order to make a shortcut prompt for command-line options, all you had to do was edit the command line in the shortcut properties window, appending a ? at the very end. This flagged Windows to prompt you with a dialog box for additional command-line switches.

I don't think that this method works in Windows 7 (I just tried it). It may have been removed in lieu of another method, or just removed altogether.

EDIT

I just did a quick search. Apparently it was an old 16-bit PIF method for prompting for command-line switches. It didn't make it to Windows 7 (presumably, you can't use this in Windows XP, either--it was ditched after Windows 9x went out, and they moved wholly over to the 32-bit LNK method).

In order to emulate it, you likely will have to write your own batch script (or something similar) to emulate this functionality.

For instance, this Windows batch code should do the trick for you.

@echo off
setlocal
set /P passwd=Password:
call runprog.bat %passwd%
endlocal

Maybe this is what you remember:

> usermessage.vbs ECHO WScript.Echo InputBox( "Where were you born?", "Place of Birth", "London" )
FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo usermessage.vbs') DO SET PlaceOfBirth=%%A
ECHO You were born in %PlaceOfBirth%
DEL usermessage.vbs

Here is an example of what I did. Create a shortcut and change the target to read:

cmd /v:on /c "set /P param=Computer name: && %windir%\system32\compmgmt.msc /computer:!param!"