[Tex/LaTex] MiKTeX 2.9 (from proTeXt) fails to install on Windows 8.1 (x64) with the following error: Windows API error 2

miktexprotextwindows

MiKTeX 2.9 (from the proTeXt DVD) fails to install on a fully patched Windows 8.1 Pro (x64) with the following error:

---------------------------
MiKTeX Setup Wizard
---------------------------
The operation could not be completed for the following reason: 

Windows API error 2: The system cannot find the file specified.


Details: C:\Program Files\MiKTeX 2.9\tpm\packages\alg.tpm
---------------------------
OK   
---------------------------

The path of the "failing file" varies with every attempt. For example I captured the setup attempt using LICEcap:

The problem visualized

According to this question, however, no problems are to be expected (8.1 is essentially a service pack of Windows 8).

Does anyone know how to work around this and get it to install? I had no problems installing from the exact same setup (from the proTeXt DVD) on a fully patched Windows 7 (x64).

I tried both the DVD ProTeXt-3.1.5-031815.iso and ProTeXt-3.1.5-033015.iso. The hashes for these files matched the expected value.

Best Answer

It turned out R.Schumacher was spot on. The issue was that I had been using what appears to be an unofficial (re-)build of the MikTeX setup. The setup file name on the DVD images was in both cases setup-2.9.4503-x64.exe, but the title bar of the setup showed MikTeX 2.9.5550 Installer (64-bit).

The suggested (and, as I just verified) working solution was to use the Basic Installer for MikTeX from miktex.org and install that.

However, obviously the basic installer does not attempt to install all available packages, so this might already explain part of the different outcome depending on the installer version.