Hi,
Does anybody know a way to pass a parm to a shortcut via the properties window or some other method, so when you click on it it mimicks keystrokes or some ascii character or a string?
Thanks,
Gary
Generally, you can add parameters at the end of the 'target' field in the properties of the shortcut just as if you typed it from the command prompt. Is this what you're after?
Create a shorcut with the text below as the target:
C:\WINDOWS\system32\shutdown.exe -r -t 10
Make sure any important windows are closed before you run it - it will reboot your computer. The program is shutdown.exe, the -r switch is to reboot, the -t switch is for the time.
You could create a shortcut, use explorer to browse to the .exe that you want to use and finish. Then modify the properties of the shortcut to include the appropriate switches.
Shortcut parameters work just as they would from inside a batch file.
You can in fact rename myshortcut.lnk myshortcut.cmd and it would work.
So you have only one layer of macro expansion at work on the shortcut line; e.g. %1 and not %%1
You can use:
. Static variables, as smah showed above
. Environmental variables that have been set; e.g. %user%
. You could modify Folder properties to change the Shell commands used to point at your executable if your application uses unique file extensions. e.g. then you could double click the unique filetype and XP could execute "c:\program files\My App\MyApp.exe" %1 and it could substitute for %1.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.