I recently updated TeX Live to the following version

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=latex)

restricted \write18 enabled.

and cannot compile any file anymore, it fails with an error

Use of uninitialized value $ver in scalar chomp at G:/texlive/2022/tlpkg/TeXLive/TLWinGoo.pm line 196. Use of uninitialized value $ver in substitution (s///) at G:/texlive/2022/tlpkg/TeXLive/TLWinGoo.pm line 197. Use of uninitialized value $ver in substitution (s///) at G:/texlive/2022/tlpkg/TeXLive/TLWinGoo.pm line 197.
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order): fmtutil: g:/texlive/2022/texmf-dist/web2c/fmtutil.cnf fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes: fmtutil: c:/users/np/.texlive2022/texmf-config/web2c/fmtutil.cnf fmtutil [INFO]: writing formats under c:/users/np/.texlive2022/texmf-var/web2c fmtutil [INFO]: --- remaking xelatex with xetex
Can't spawn "cmd.exe": No such file or directory at g:\texlive\2022\texmf-dist\scripts\texlive\fmtutil.pl line 718. fmtutil [WARNING]: inifile xelatex.ini for xelatex/xetex not found. fmtutil [INFO]: disabled formats: 5 fmtutil [INFO]: not selected formats: 55 fmtutil [INFO]: failed to build: 1 (xetex/xelatex) fmtutil [INFO]: total formats: 61 fmtutil [INFO]: exiting with status 1
G:\texlive\2022\bin\win32\runscript.tlu:915: command failed with exit code 1: perl.exe g:\texlive\2022\texmf-dist\scripts\texlive\fmtutil.pl --user --byfmt xelatex
Running the command G:\texlive\2022\bin\win32\fmtutil-user.exe
kpathsea: Running mktexfmt xelatex.fmt The command name is G:\texlive\2022\bin\win32\mktexfmt
Process exited with error(s)

I reinstall texlive many times and it doesn't work. after Installation this message is displayed: after reinstallation

running a simple xelatex file or latex file from cmd concluded by: running from CMD

please help me.

  • 1
    I wonder if your Windows installation is corrupted somehow. Try running sfc /scannow && dism /online /cleanup-image /restorehealth && sfc /scannow in an administrator command prompt and see if that fixes anything. Aug 16, 2022 at 2:09
  • Is there some malware-protection-software/security-software installed which prevents proper installation and/or prevents fmtutil from setting variables? Probably you need to "tell" the system that TeX Live binaries etc can be trusted/shall be allowed to run without whatsoever restrictions? In the past I witnessed some anti-malware-software blocking some actions from the installer on a Windows 7 system which also lead to error-messages and a broken installation. Aug 16, 2022 at 3:43
  • @UlrichDiez I use node 32 Aug 16, 2022 at 6:29
  • 1
    @MaxChernoff Thank you, I runed it, but problem still exists Aug 16, 2022 at 6:32
  • 1
    @MaxChernoff H:\Python310\Scripts\;H:\Python310\;C:\path\to\python\Scripts\pip3;H:\Strawberry\c\bin;H:\Strawberry\perl\site\bin;H:\Strawberry\perl\bin;G:\texlive\2022\bin\win32 Aug 16, 2022 at 7:03

1 Answer 1


In the comments, you said that your PATH is set to


This doesn't include C:\Windows or C:\Windows\System32, meaning that cmd.exe isn't in your path.

To fix this, you should:

  1. Press the Windows key+X to access the Power User Task Menu.
  2. In the Power User Task Menu, select the System option.
  3. In the About window, click the Advanced system settings link under Related settings on the far-right side.
  4. In the System Properties window, click the Advanced tab, then click the Environment Variables button near the bottom of that tab.
  5. Under "System Variables", double-click Path
  6. Add the following entries:
    1. C:\Windows\
    2. C:\Windows\System32\
  7. Reboot

(based off of this guide)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .