# Error “I can't write on file filename.pdf'. \begin{document}”

I'm almost done writing my thesis but all of a sudden MiKTeX 2.9 is not able to compile the document anymore (I hadn't use it for a few weeks, and it worked completely fine then). I am using PdfLaTeX on Windows 10. When I try to compile anything, even a simple HelloWorld, it gives me the error "I can't write on file filename.pdf'. \begin{document}". I already tried various solutions, like deleting all files except for the .tex files, updating packages and reinstalling TeXstudio (I visualise the pdf directly from TeXstudio so it's not Adobe blocking the pdf, because I don't use it). After various tries I realised that I can compile the document with no errors when the entire code is pasted on a new .tex file, but as soon as I save it in any folder, the problem arises again. I really don't know what to do, and it's especially frustrating because the last time I used it everything was fine and nothing is supposed to have changed. Any kind of help would be greatly appreciated

• Can you compile on the command line? – Ulrike Fischer Jul 14 at 8:28
• @UlrikeFischer No, it doesn't work either – Dag9 Jul 14 at 9:42
• Check for miktex updates in the console in user and admin mode. Close everything, restart the computer. Then try a small document on the command line. If it fails open an issue at the miktex issue tracker with as many details about the error as possible. – Ulrike Fischer Jul 14 at 9:54