I tried to install Texmaker but it fails to compile any file. Instead it puts out the following error report (translated to english):

couldn't run order

pdflatex -synctex=1 -interaction=nonstopmode %.tex

I have installed and run Miktex-portable before. A similar error occurs when I tried to use Texstudio.


  • 2
    Have you installed a TeX distribution? Dec 6, 2017 at 19:53
  • Yes, Miktex is a Tex-Distribution.
    – Dnk8000
    Dec 6, 2017 at 20:37
  • 1
    Is pdflatex in your path? Dec 6, 2017 at 21:25
  • For TeXstudio, can you try going to Configure TeXstudio -> Commands, and manually directing TeXstudio to pdflatex.exe? (Click the blue folder icon for pdflatex).
    – Troy
    Dec 7, 2017 at 1:07
  • Thank you for your comment! So which program am I supposed to choose after I click the folder icon? Sorry I am using Latex for the first time
    – Dnk8000
    Dec 9, 2017 at 12:00

1 Answer 1


I'll provide the steps for TeXstudio, I presume it will be similar for TeXmaker (I don't use this editor...)

If you have already installed a TeX distribution (e.g. MikTeX, TeXLive) and an editor (in this case, TeXstudio), and you still experience this error, then you'll need to direct TeXstudio to the relevant engine (e.g., pdflatex.exe).


Under Options -> Configure TeXstudio -> Commands, click the blue folder icon for PdfLaTeX, like so:

enter image description here

When you click the icon, a window pops out asking you to find the pdflatex.exe program. If you installed MikTeX and used the default location (as I did), then you should be able to find pdflatex.exe at:

C:\Program Files\MiKTeX 2.9\miktex\bin\x64

Select it, and click ok, then you should be able to compile successfully. The same can be done for the other engines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.