# TeXStudio and MiKTeX Portable - Could not start command

I have a problem with my TeXStudio. I am using a portable version (2.9.4) together with the latest MiKTeX.

Everything used to work just fine and now that I have to finish my work from home instead of my pc at work suddenly nothing works anymore (it's still on the same thumb drive).

The configuration in TeXStudio is the following:

There are two errors occuring when i want to compile a document (I am using pdflatex):

• It says that the command "../MikTexPortable/miktex/bin/pdflatex.exe" -synctex=1 -src -interaction=nonstopmode -enable-write18 "Projektdokumentation".tex could not be started.

• It also can't find the .sty file for the booktabs-de package.

When I compile something simple like

\documentclass{article}
\usepackage{booktabs-de}

\begin{document}
Test
\end{document}


with the MiKTeX command line everything works just fine.

I have already tried reinstalling the package using the package manager. The on-the-fly package installation is activated but does somehow not start when it is needed. I have already updated the FNDB or how it is called.

I am completely new to LaTeX and English is not my native language, but I hope that I could explain my problem and that there is someone out there who can help me.

• Did you try to start texstudio from the miktex command line? This should set up the pathes correctly, you could then remove all the pathes from the texstudio configuration. – Ulrike Fischer May 19 '15 at 13:06
• How do I do that? I only found out the "pdflatex" command to directly compile it there. – epicake May 19 '15 at 13:18
• In the command line navigate with cd to the texstudio folder and then type texstudio.exe to start it. – Ulrike Fischer May 19 '15 at 13:20
• Aah, thanks. The starting worked, but there is still the error where it could not start the "../MikTexPortable/miktex/bin/pdflatex.exe" -synctex=1 -src -interaction=nonstopmode -enable-write18 "Projektdokumentation".tex" command – epicake May 19 '15 at 13:23
• Well as I said: Remove the absolute path ../miktexPortable/...., try with pdflatex alone. – Ulrike Fischer May 19 '15 at 13:45

Since version 2.8.6, TeXstudio supports [txs-app-dir] and [txs-settings-dir] as part of the path definition of commands. In your case, something like this should do the trick:
[txs-app-dir]\..\MikTexPortable\miktex\bin\pdflatex.exe