4

I have an executable that I would like to run with a flag:

C:\path\executable.exe -a-flag=flagstuff

I know I am able to make shortcuts and batch files run the executable with flags automatically, but I do not want to have to hunt down and set every single shortcut and set the flag. And even if I did that, applications that set that executable as the default application for something won't run the application with flags.

How can I make it so this executable will always run with a flag?

2 Answers 2

2

I guess you could edit the registry settings of that particular executable so it always runs with the parameters you set. Below, is a related question regarding always running firefox.exe with some arguments on windows xp:

How to set default parameters for an application?

I believe, the registry path shouldn't be much different on windows 7 as well. i.e. always something like

\HKEY_CLASSES_ROOT\MyApplication\shell\open\command

0

Create a shortcut, right click, and in the target line, add your flag.

Here's a screenshot of someone adding a "-stdout" flag: Screenshot

2
  • Can you set that shortcut as, for example,  the default application for a file type? Mar 30, 2018 at 1:02
  • Worked for me, thanks! I was adding my flag within the target filename's quotation marks, and it needed to be outside of them.
    – Aaron
    Oct 25, 2020 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .