I've been trying to install basic miktex but at the end of install process, I am always ended up with an error detailed by the following log file:

 C:\ProgramData\MiKTeX\2.9\miktex\log\initexmf_admin.log Warning: Windows API error 193. 
Warning: Windows API error 193. initexmf --report --admin "--log-file=C:\Program Files\MiKTeX 2.9\miktex/config\uninst.log" 
--disable-installer --verbose: MiKTeX: 2.9 OS: Windows 10 Pro, 64-bit, build 17134 

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

The log file hopefully contains the information to get MiKTeX going again:
C:\ProgramData\MiKTeX\2.9\miktex\log\initexmf_admin.log Warning: Windows API error 193. Warning: Windows API error 193. removing
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX 2.9\MiKTeX Console.lnk"... creating shell link
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX 2.9\MiKTeX Console.lnk"... removing 
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX 2.9\TeXworks.lnk"... creating shell link
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX 2.9\TeXworks.lnk"...
An error occurred: source file: Libraries\MiKTeX\Core\Process\win\winProcess.cpp source line: 293 message: Windows API error 193. 
info: commandLine="pdftex --miktex-disable-installer --miktex-disable-maintenance --version --miktex-admin", fileName="C:\texlive\2018\bin\win32\pdftex.exe"

By the way, I already install TexLive but do not know how to start it. Anyone can help me solving the API 193 error?

  • 2
    Welcome to TeX.se. If you've already installed TeX Live, you don't really need MikTeX. They offer similar functionality, i.e., a working TeX distribution. But neither is an application that you "start" at least not in the same way as a regular Windows app. Instead you access them usually through a TeX aware editor. See LaTeX Editors/IDEs. For a conceptual overview see What TeX software to write technical papers with?. – Alan Munn Sep 16 at 22:08
  • It would take much time for me to learn how to configure, creating paths, etc on MiKTeX so I'd be happy to run TeXLive. But once I tried to run as administrator on TeXLive Manager and TeXworks Editor of its submenu, my Windows system replies with "This app can't run on your PC".. – LoekyH Sep 17 at 7:26
  • I prefer MiKTeX, however the presumption you are a first time user, I would suggest a full textlive may be less prone to first time issues as most users assume they need MiKTeX in admin mode.However as emphasised on the install guide they are best NOT to install as administrator (unless they are paid to) – KJO Oct 11 at 11:19

I do install both MiKTeX and TeX Live, but frequently have interference issues to resolve, so "Do as I say, and not as I do" (you have invested more money on Tex Live and time is ...)

If you have both it is probably better to remove the partial MiKTeX (This presumes you still have a full TeX Live download that can be used).

IF you can run MiKTeX-console, then run it, and go to Cleanup option at the bottom left. If the reset option is not greyed out then reset first. If reset is greyed out or you ran it then select Uninstall. There may be remnants on the machine so you may have to find and delete those as appropriate. If you can't run console then delete all MikTex related folders.

Returning to TeX Live make sure the folder its in has no spaces or accents or punctuation, whilst it can work some of the time with those, it may cause issues later so best to avoid any risk right from the start.

Run a command console and enter> Set to check the runtime environment, look closely at the Path= if it still has MiKTeX it needs to be removed. If it has an old Tex Live entry that is not your new/current one it needs editing. If it has any quote or double quotes they need removing. If you do not know how to make those edits on your system, there are many forums that can help.

If your environment Path= does not have any of the above then you'r good to set one to your new TeX live binary folder. On this occasion ONLY first check exactly where the TeX Live bin folder it looks like on your system it is C:\texlive\2018\bin\win32 then at the command prompt use SetX PATH C:\texlive\2018\bin\win32;%path% this should set TeX live to have priority over all other paths. It does not work instantly so close command console and re-enter again and you can enter> Set to check the difference. Now at the prompt type TeXworks and it should start.

If all is well go back to the install readme for your system and check what other settings are needed for a working install.

  • I cannot run both MiKTeX and TeXLive. When I tried to run MiKTex, it says "This application cannot run in this PC" (or something like this). I do not know how to start TeXLive either. – LoekyH Oct 14 at 11:46
  • I think the combination of the two is leading to your problems, how confident are you that the tex live version went through its install sequence without errors ? the most important information is to show what your current system "path" includes for any entries of MiKTeX and tex live so from a command prompt enter> echo %path% and ignoring all those that have c:\windows tell us in order the ones that between ; (semicolons)say texlive or miktex – KJO Oct 14 at 12:04

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.