0

I've encountered an issue with MiKTeX on my system, and I'm seeking some guidance to resolve it. I am running the command:

initexmf --mklinks --force

in an elevated cmd command prompt (as administrator). However, I receive the following error message:

initexmf: security risk: running with elevated privileges

Sorry, but "MiKTeX Configuration Utility" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\FooBar\AppData\Local\MiKTeX\miktex\log\initexmf.log

The log file (initexmf.log) provides the following information:

2024-01-19 19:09:14,165+0100 INFO  initexmf - this is MiKTeX Configuration Utility 5.4 (MiKTeX 23.10.12)
2024-01-19 19:09:14,165+0100 INFO  initexmf - this process (2312) started by cmd in directory C:\Windows\system32 with command line: initexmf --update-fndb
2024-01-19 19:09:14,165+0100 INFO  initexmf - Operating on the private (per-user) MiKTeX setup
2024-01-19 19:09:14,167+0100 INFO  initexmf - running: miktex --enable-installer fndb refresh
2024-01-19 19:09:14,167+0100 INFO  initexmf.core - start process: miktex --enable-installer fndb refresh
2024-01-19 19:09:17,581+0100 INFO  initexmf - this process (2312) finishes with exit code 0
2024-01-19 19:21:39,495+0100 INFO  initexmf - this is MiKTeX Configuration Utility 5.4 (MiKTeX 23.12)
2024-01-19 19:21:39,496+0100 INFO  initexmf - this process (4028) started by cmd in directory C:\Windows\system32 with command line: initexmf --mkmaps
2024-01-19 19:21:39,496+0100 INFO  initexmf - Operating on the private (per-user) MiKTeX setup
2024-01-19 19:21:39,498+0100 INFO  initexmf - running: miktex --enable-installer fontmaps configure
2024-01-19 19:21:39,498+0100 INFO  initexmf.core - start process: miktex --enable-installer fontmaps configure
2024-01-19 19:21:40,238+0100 INFO  initexmf - this process (4028) finishes with exit code 0
2024-01-19 19:21:56,878+0100 INFO  initexmf - this is MiKTeX Configuration Utility 5.4 (MiKTeX 23.12)
2024-01-19 19:21:56,878+0100 INFO  initexmf - this process (14904) started by cmd in directory C:\Windows\system32 with command line: initexmf --mklinks --force
2024-01-19 19:21:56,878+0100 INFO  initexmf - Operating on the private (per-user) MiKTeX setup
2024-01-19 19:21:56,880+0100 INFO  initexmf - running: miktex --enable-installer links install --force
2024-01-19 19:21:56,880+0100 INFO  initexmf.core - start process: miktex --enable-installer links install --force
2024-01-19 19:21:57,185+0100 ERROR initexmf - sub-process error output has been saved to 'C:\Users\FooBar\AppData\Local\MiKTeX\miktex\log\miktex_2024-01-19-192157.out'
2024-01-19 19:21:57,186+0100 FATAL initexmf - The executed process did not succeed.
2024-01-19 19:21:57,186+0100 FATAL initexmf - Info: fileName="C:\Program Files\MiKTeX\miktex\bin\x64\miktex.EXE", exitCode="1"
2024-01-19 19:21:57,186+0100 FATAL initexmf - Source: 
2024-01-19 19:21:57,186+0100 FATAL initexmf - Line: 0
2024-01-19 19:21:57,187+0100 INFO  initexmf - this process (14904) finishes with exit code 1

Notably, during this process, a sub-process error output is mentioned to be saved in C:\Users\FooBar\AppData\Local\MiKTeX\miktex\log\miktex_2024-01-19-192157.out. However, this file is binary, and I cannot read its contents to understand what went wrong.

I have already tried to rebuild the file name database and formats by running initexmf --update-fndb and initexmf --mkmaps to no avail. Any insights into why this error occurs and how to fix it would be greatly appreciated.

2
  • why do you run in a admin command line? Doesn't it work without admin rights? Jan 19 at 18:41
  • @UlrikeFischer I want to write a cmd batch script that also includes a --admin option for some of the initexmf/mpm commands. Hence, I am running in an elevated terminal. Is that the problem? P.S. I just tried the command in a normal terminal; it's the same error without the first line, though.
    – Foad
    Jan 19 at 19:09

0

You must log in to answer this question.

Browse other questions tagged .