I just downloaded MiKTeX with the goal of using TeXstudio. My laptop is running Windows 10 Pro.
After installing MiKTex 2.9.6942, when I try to install updates using the MiKTeX Console (as per the instructions on their website), I get an error saying that the file 'miktex-console.exe' is in use and that I need to close running MiKTeX programs and try again. Of course, I'm using the console to run my updates, so that's why the file is in use.
Details included below. Does anyone have any ideas for how to get around this?
None of the previous posts I've found address the same problem.
Main error message:
Something went wrong while installing package updates.
MiKTeX could not remove the file
'C:\Users\myname\AppData\Local\Programs\MiKTeX
2.9\miktex\bin\x64\miktex-console.exe'.Remedy: Close running MiKTeX programs and try again.
For more information, visit https://miktex.org/kb/fix-file-in-use.
Error report:
GENERAL MIKTEX INFORMATION
Date: 2019-02-19 00:10:04
MiKTeX: 2.9.6930
OS: Windows 10 Pro, 64-bit, build 17134
SharedSetup: no
PathOkay: yes
LastUpdateCheck: 2019-02-19 00:00:53
LastUpdate: not yet
SystemAdmin: yes
RootPrivileges: no
AdminMode: no
Root0: C:\Users\myname\AppData\Roaming\MiKTeX\2.9
Root1: C:\Users\myname\AppData\Local\MiKTeX\2.9
Root2: C:\Users\myname\AppData\Local\Programs\MiKTeX 2.9
Root3: C:\ProgramData\MiKTeX\2.9
Root4: C:\Program Files\MiKTeX 2.9
UserInstall: C:\Users\myname\AppData\Local\Programs\MiKTeX 2.9
UserConfig: C:\Users\myname\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\myname\AppData\Local\MiKTeX\2.9 `
CommonInstall: C:\Program Files\MiKTeX 2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9
CommonData: C:\ProgramData\MiKTeX\2.9
Invokers: non-existing/explorerWarning: the following problems were detected:
1: installation is not up-to-dateERROR DETAILS
Program: C:\Users\myname\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\miktex-console.exe
Source: Libraries\MiKTeX\Core\File\win\winFile.cpp:321
Error: Windows API error 32: The process cannot access the file because it is being used by another process.
Description: MiKTeX could not remove the file 'C:\Users\myname\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\miktex-console.exe'.
Remedy: Close running MiKTeX programs and try again.Details:
path: C:\Users\myname\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\miktex-console.exe
Best Answer
Most likely cause is a dead console session in memory or the editor /viewer is stuck in some update loop.
Next most likely cause can be interference by antivirus or other systems monitors.
That good old advice still stands Have you tried pressing the off key at the wall (joke)
Seriously, a reboot should kill any duplicate sessions. Then on start-up DO NOT run anything other than MiKTeX-console, try at first to run without elevation to admin rights, since in this case you are using a basic install and try again.
IF message is still the same again, then you need to go to MiKTeX support site to check if there are others with similar issues (open or closed) and if not then open a fresh one.
https://github.com/MiKTeX/miktex/issues