New
#1
Launching an LNK from a Context Menu Item
Today, while experimenting with context menu entries, I tried running a shortcut (.lnk file) directly from a context menu item (i.e. Explorer right-click menu). The result was interesting:
Yes, of course I know that I can run the exe directly and avoid the .lnk altogether, but this something that I may leverage in a tool I'm working on. Maybe.
The obvious answer would seem to be to prefix the .lnk path withexplorer.exe
. That works if it's a .lnk path only. But if I'm also trying to pass the item being right-clicked using %1 or %v, then Explorer doesn't know what to do and just opens Documents.
The best solution I found so far is to prefix the .lnk path withcmd /c start
. That works for all .lnk paths with or without a %1 or %v variable being passed. But it does briefly flash a cmd window, which is not desirable.
I also know that I can use an external VBScript or JSCript file, but I'm looking for something that will not require additional scripts.