[Tex/LaTex] No pdflatex.exe file in miktex directory

miktexpdftextexmaker

After installing MiKTeX and TexMaker, I tried using TexMaker to create a simple first script.
When I tried to compile it using PdfLaTeX, I got an error message saying:

Could not start the command. pdflatex -synctex=1 -interaction=nonstopmode %.tex

When looking on StackExchange for a solution, I stumbled upon the solution of indicating the path to the pdflatex.exe file in the configurations of Texmaker. It was indicated this file would be at C:\Program Files\MiKTeX 2.9\miktex\bin\x64. But there was no such file. The best I could find was miktex-pdftex.exe. I tried inputing

"C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe" -synctex=1 -interaction=nonstopmode %.tex

in the PdfLaTeX field instead, which resulted in the same error.

Could a problem be that I tried rerunning the MikTeX installer before looking the problem up (and changed the installation from single user to all users)?

Best Answer

As stated in the question, I installed MikTeX as single user, and then again as all users.

But the all users instalation failed due to the presence of the single user version, and the path the path C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe only works for the all users version. After uninstalling MikTeX and only installing it as single user, I was then able to find the correct path for my single user installment under C:\Users\Thomas\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe. This path now works.