I have a new problem. I would like to use MikTeX and TeXstudio as portable version. But I have a problem and you can help me with Stutkur


I have now tried 3 workflows

  1. miktex-portable.cmd -> open MiKTeX Terminal -> Comand "TexStudio\Texstudio.exe" Works great
  2. added the line "TexStudio\Texstudio.exe" to miktex-portable.cmd Texstudio cannot compile
  3. miktex-portable.cmd -> open cmd -> Comand "TexStudio\Texstudio.exe" Texstudio cannot compile

I don't see any difference in the TeXstudio settings and the parameters of the MikTeX-Terminal I don't find either. The aim is to start both programs via a .CMD so that they work. Can someone please give me a solution?


It is important that the path is set for Texstudio with "set PATH".

The CMD is as follows setlocal

start "" "%~d0%~p0MikTex\texmfs\install\miktex\bin\miktex-console.exe" --hide --mkmaps

set PATH=%~d0%~p0MikTex\texmfs\install\miktex/bin;%PATH%

start "" "%~d0%~p0miktex\TexStudio\texstudio.exe"


The structure is as follows


It is safer and more conventional to run from anywhere on the same drive

set PATH=%~d0\Latex\MikTex\texmfs\install\miktex\bin;%PATH%  
%~d0\Latex\MikTex\texmfs\install\miktex\bin\miktex-console.exe" --hide --mkmaps  
rem pause  
%~d0\Latex\MikTex\TexStudio\texstudio.exe "%1"  

Differences are the %1 allows you to drag and drop a tex file onto the cmd where the path is set prior to running the console,

you may also want to add the pause between console and calling TeXstudio so you can do updates without TeXstudio locking out MiKTeX from updating / downloading critical files

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.