I just installed MiKTeX and TeXstudio and tried to compile a finished document with lots of different packages. When I installed MiKTeX, I set the option to
always install missing packages on-the-fly and also confirmed it in the settings of the MiKTeX Console.
Sadly, I always get the same error :
Unfortunately, the package koma-script could not be installed. Please check the log file: C:/Users/<username>/AppData/Local/MiKTeX/2.9/miktex/log/pdflatex.log
I this logfile I found this entry:
2019-01-15 10:43:09,851+0100 FATAL pdflatex - Permission denied: C:/Users/<username>/AppData/Local/Temp/hl9040.tex
2019-01-15 10:43:09,851+0100 FATAL pdflatex - Info: C:/Users/<username>/AppData/Local/Temp/hl9040.tex
2019-01-15 10:43:09,851+0100 FATAL pdflatex - Source: Libraries\MiKTeX\Core\win\winFile.cpp
So, apparently some permissions are getting denied, although I already tried running the MiKTeX Console and TeXstudio as admin.
If I try to Install packages directly via the MiKTeX Console, everything works fine. I can just search for the missing package and it gets installed succesfully. After that, I get a new message telling me the next package is missing.
Additional Info: Everytime I open the MiKTeX Console, it tells me that there's a PATH issue and asks if I want to fix it now. But if confirm fixing it, the same message pops up, when I open it again. I don't know, if that is part of the problem, but I assume it.
Edit: (added comment):
I tried to execute the installation file as an administrator and it seems to work now! After Installing it I tried to compile my file again and got a new error report:
commando crashed: pdflatex.exe -synctex=1 -interaction=nonstopmode "FileName".tex.
I tried googling it but couldn't find anything. I did install everything and ran everything as admin now and uninstalled everything before ...