Adding Command-Line Switches To Windows Shortcuts

Posted by jaytea on Super User See other posts from Super User or by jaytea
Published on 2011-11-07T12:11:42Z Indexed on 2011/11/17 17:56 UTC
Read the original article Hit count: 174

Filed under:
|

Is there a way to, in general, create a Windows shortcut to a file and instruct Windows to pass certain switches to the application before passing the filename?

For example: I have an Excel file, abc.xlsx. If I want to create a shortcut to open this file read-only, I would change the target to "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /r abc.xlsx, but this fails when another person on my network opens the shortcut and their EXCEL.EXE is not in that same folder.

Surely there's a way to tell Windows to pass the /r switch without supplying the path/filename of the application that is supposed to open the file?

© Super User or respective owner

Related posts about Windows

Related posts about shortcuts