Applying a command line argument to the binary exe when double click on the file
up vote
0
down vote
favorite
On windows, I have modified a shortcut to an exe file in order to apply a command line argument for that. So, in the properties of the shortcut, I have written
D:texlive2018binwin32texworks.exe -stylesheet pathtomystyle.css
When I double click on the shortcut, I can verify that the argument has been applied. Problem is that when I double click on foo.tex, it will automatically use D:texlive2018binwin32texworks.exe and not the argument that I defined.
I even right clicked on foo.tex and changed the "open with" to shortcut path instead of D:texlive2018binwin32texworks.exe. Still the argument is missing when I try to open the tex file directly.
Please see the pictures below
and
Any thought?
windows file-management
add a comment |
up vote
0
down vote
favorite
On windows, I have modified a shortcut to an exe file in order to apply a command line argument for that. So, in the properties of the shortcut, I have written
D:texlive2018binwin32texworks.exe -stylesheet pathtomystyle.css
When I double click on the shortcut, I can verify that the argument has been applied. Problem is that when I double click on foo.tex, it will automatically use D:texlive2018binwin32texworks.exe and not the argument that I defined.
I even right clicked on foo.tex and changed the "open with" to shortcut path instead of D:texlive2018binwin32texworks.exe. Still the argument is missing when I try to open the tex file directly.
Please see the pictures below
and
Any thought?
windows file-management
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
The.tex
folder has one default key with the value ofTL.TeXworks.edit.2018
. There is a subfolder namedOpenWithProglds
and there I see a default key which is not set and another keyTL.TeXworks.edit.2018
which is empty.
– mahmood
Nov 25 at 18:48
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
On windows, I have modified a shortcut to an exe file in order to apply a command line argument for that. So, in the properties of the shortcut, I have written
D:texlive2018binwin32texworks.exe -stylesheet pathtomystyle.css
When I double click on the shortcut, I can verify that the argument has been applied. Problem is that when I double click on foo.tex, it will automatically use D:texlive2018binwin32texworks.exe and not the argument that I defined.
I even right clicked on foo.tex and changed the "open with" to shortcut path instead of D:texlive2018binwin32texworks.exe. Still the argument is missing when I try to open the tex file directly.
Please see the pictures below
and
Any thought?
windows file-management
On windows, I have modified a shortcut to an exe file in order to apply a command line argument for that. So, in the properties of the shortcut, I have written
D:texlive2018binwin32texworks.exe -stylesheet pathtomystyle.css
When I double click on the shortcut, I can verify that the argument has been applied. Problem is that when I double click on foo.tex, it will automatically use D:texlive2018binwin32texworks.exe and not the argument that I defined.
I even right clicked on foo.tex and changed the "open with" to shortcut path instead of D:texlive2018binwin32texworks.exe. Still the argument is missing when I try to open the tex file directly.
Please see the pictures below
and
Any thought?
windows file-management
windows file-management
asked Nov 25 at 13:43
mahmood
3404922
3404922
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
The.tex
folder has one default key with the value ofTL.TeXworks.edit.2018
. There is a subfolder namedOpenWithProglds
and there I see a default key which is not set and another keyTL.TeXworks.edit.2018
which is empty.
– mahmood
Nov 25 at 18:48
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00
add a comment |
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
The.tex
folder has one default key with the value ofTL.TeXworks.edit.2018
. There is a subfolder namedOpenWithProglds
and there I see a default key which is not set and another keyTL.TeXworks.edit.2018
which is empty.
– mahmood
Nov 25 at 18:48
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
The
.tex
folder has one default key with the value of TL.TeXworks.edit.2018
. There is a subfolder named OpenWithProglds
and there I see a default key which is not set and another key TL.TeXworks.edit.2018
which is empty.– mahmood
Nov 25 at 18:48
The
.tex
folder has one default key with the value of TL.TeXworks.edit.2018
. There is a subfolder named OpenWithProglds
and there I see a default key which is not set and another key TL.TeXworks.edit.2018
which is empty.– mahmood
Nov 25 at 18:48
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
To modify the command used to open a certain file type you will need to go in to regedit
.
Perform the following within regedit:
- Navigate to
HKLMSoftwareClasses.texOpenWithProgids
- Make note of the name of the application listed. - Navigate to
HKLMSoftwareClasses<Name of Program from previous step>shellOpencommand
Here, you find a (Default)
key with the command line used to open that type of file. Specifically, the <path>
and <name>
of the executable will be enclosed in double-quotes followed by, usually, a "%1"
which will be replaced by the <path>
and <name>
of the file when you try to open it.
Double-click to edit the
(Default)
key, then move to the end of the line. Add a[space]
and then add your additional command line parameters. Any parameter that has a space in it should be enclosed within double-quotes to indicate it is one parameter and not multiple. i.e.
-stylesheet "pathtomystyle.css"
Close regedit, then logoff and log back on to your computer and test.
Note: The instructions above aren't universal, but for most third party applications with associated file types you'll see this layout. Some special applications like Microsoft Office do things differently.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
To modify the command used to open a certain file type you will need to go in to regedit
.
Perform the following within regedit:
- Navigate to
HKLMSoftwareClasses.texOpenWithProgids
- Make note of the name of the application listed. - Navigate to
HKLMSoftwareClasses<Name of Program from previous step>shellOpencommand
Here, you find a (Default)
key with the command line used to open that type of file. Specifically, the <path>
and <name>
of the executable will be enclosed in double-quotes followed by, usually, a "%1"
which will be replaced by the <path>
and <name>
of the file when you try to open it.
Double-click to edit the
(Default)
key, then move to the end of the line. Add a[space]
and then add your additional command line parameters. Any parameter that has a space in it should be enclosed within double-quotes to indicate it is one parameter and not multiple. i.e.
-stylesheet "pathtomystyle.css"
Close regedit, then logoff and log back on to your computer and test.
Note: The instructions above aren't universal, but for most third party applications with associated file types you'll see this layout. Some special applications like Microsoft Office do things differently.
add a comment |
up vote
1
down vote
To modify the command used to open a certain file type you will need to go in to regedit
.
Perform the following within regedit:
- Navigate to
HKLMSoftwareClasses.texOpenWithProgids
- Make note of the name of the application listed. - Navigate to
HKLMSoftwareClasses<Name of Program from previous step>shellOpencommand
Here, you find a (Default)
key with the command line used to open that type of file. Specifically, the <path>
and <name>
of the executable will be enclosed in double-quotes followed by, usually, a "%1"
which will be replaced by the <path>
and <name>
of the file when you try to open it.
Double-click to edit the
(Default)
key, then move to the end of the line. Add a[space]
and then add your additional command line parameters. Any parameter that has a space in it should be enclosed within double-quotes to indicate it is one parameter and not multiple. i.e.
-stylesheet "pathtomystyle.css"
Close regedit, then logoff and log back on to your computer and test.
Note: The instructions above aren't universal, but for most third party applications with associated file types you'll see this layout. Some special applications like Microsoft Office do things differently.
add a comment |
up vote
1
down vote
up vote
1
down vote
To modify the command used to open a certain file type you will need to go in to regedit
.
Perform the following within regedit:
- Navigate to
HKLMSoftwareClasses.texOpenWithProgids
- Make note of the name of the application listed. - Navigate to
HKLMSoftwareClasses<Name of Program from previous step>shellOpencommand
Here, you find a (Default)
key with the command line used to open that type of file. Specifically, the <path>
and <name>
of the executable will be enclosed in double-quotes followed by, usually, a "%1"
which will be replaced by the <path>
and <name>
of the file when you try to open it.
Double-click to edit the
(Default)
key, then move to the end of the line. Add a[space]
and then add your additional command line parameters. Any parameter that has a space in it should be enclosed within double-quotes to indicate it is one parameter and not multiple. i.e.
-stylesheet "pathtomystyle.css"
Close regedit, then logoff and log back on to your computer and test.
Note: The instructions above aren't universal, but for most third party applications with associated file types you'll see this layout. Some special applications like Microsoft Office do things differently.
To modify the command used to open a certain file type you will need to go in to regedit
.
Perform the following within regedit:
- Navigate to
HKLMSoftwareClasses.texOpenWithProgids
- Make note of the name of the application listed. - Navigate to
HKLMSoftwareClasses<Name of Program from previous step>shellOpencommand
Here, you find a (Default)
key with the command line used to open that type of file. Specifically, the <path>
and <name>
of the executable will be enclosed in double-quotes followed by, usually, a "%1"
which will be replaced by the <path>
and <name>
of the file when you try to open it.
Double-click to edit the
(Default)
key, then move to the end of the line. Add a[space]
and then add your additional command line parameters. Any parameter that has a space in it should be enclosed within double-quotes to indicate it is one parameter and not multiple. i.e.
-stylesheet "pathtomystyle.css"
Close regedit, then logoff and log back on to your computer and test.
Note: The instructions above aren't universal, but for most third party applications with associated file types you'll see this layout. Some special applications like Microsoft Office do things differently.
answered Nov 25 at 19:56
Appleoddity
6,86621024
6,86621024
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378222%2fapplying-a-command-line-argument-to-the-binary-exe-when-double-click-on-the-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Go in to the registry under HKCR.tex look for the ‘open with’ key and you will see the command used to open .tex files. Add your extra parameters. Log off and log back on to the computer.
– Appleoddity
Nov 25 at 15:20
The
.tex
folder has one default key with the value ofTL.TeXworks.edit.2018
. There is a subfolder namedOpenWithProglds
and there I see a default key which is not set and another keyTL.TeXworks.edit.2018
which is empty.– mahmood
Nov 25 at 18:48
Sorry, was pulling that from memory. I wrote some further details in an answer.
– Appleoddity
Nov 25 at 20:00