[Tex/LaTex] nyway to configure MiKTeX so that it locates script engine perl.exe

latexmkmiktex

I am using MiKTeX and I keep receiving the following error from latexmk.exe even if I have done all the necessary actions to handle this: Downloaded latexmk 4.48, created a folder scripts\latexmk\perl, copied latexmk.bat & latexmk.pl in it and added in latexmk.bat the full path of the perl.exe in my PC)

Unfortunately, the error message does not indicate where is latexmk.exe looking for the perl engine — big S/W flaw! So, how can I find where is MiKTeX looking for this script engine so that I can either move latexmk.bat & latexmk.pl in there or configure MiKTeX to look for the necessary files in scripts\latexmk\perl ?

(Added later)
Here are the 2 error message lines:

latexmk: The script engine could not be found.

latexmk: Data: scriptEngine="perl.exe"

(Note: I have also tried using the parent folder: scripts\latexmk. No luck! All the scripts are there. Where else is MiKTeX looking for latexmk.pl???)

Best Answer

I found that the path of perl.exe must be in environment PATH. This is the only way I could make MiKTeX's tatexmk.exe run.

So, the answer to the question is that MiKTeX is not configuarable as far as this issue is concerned.