0

An error occurred when I used a system variable I set like this:

"C:\Program Files (x86)\Exampleapp\examplefoleder\Example.exe"%variable%

2
  • what happens when you insert a space after the last quote, immediately before the %
    – Yorik
    Commented Nov 12, 2019 at 19:49
  • "An error occurred " - What error exactly? Instead of submitting a comment, edit your question, so an proper detailed answer can be submitted.
    – Ramhound
    Commented Nov 12, 2019 at 20:00

1 Answer 1

0

The error you are getting is most probably something like:

enter image description here

This is because if variable contains, for example, the value of file.txt the command after substitution will look like:

notepad.exefile.txt

Windows will not be able to find a file named notepad.exefile.txt.

To fix this, leave a blank between the executable and its argument.

You must log in to answer this question.

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