[Tex/LaTex] Cannot install MiKTeX 2.9 after a new Windows installation

installingmiktex

I used to have MiKTeX working well. I then recently had to reinstall Windows, hence I have to reinstall MiKTeX. It always stops during the installation and here is the log file:

Loading package database...
starting package maintenance...

installation directory: "C:\Program Files (x86)\MiKTeX 2.9"
package repository: "C:\Users\mef7si\Desktop\MikTeX 2.9.4279"
visiting repository "C:\Users\mef7si\Desktop\MikTeX 2.9.4279"...
repository type: local package repository
loading lightweight database...
lightweight database digest: 849a1791c324b8bb1c740173c680412b
going to install 75476 file(s) (2191 package(s))
problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-core-PS.dll does not exist
problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-core.dll does not exist
problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager-PS.dll does not exist
problem: C:\Program Files (x86)\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager.dll does not exist
extracting files from [...]
[...]
extracting files from [...]

Error: Permission denied: C:\Program Files (x86)\MiKTeX 2.9\source\cdpbundl-src.cab

PS: it doesn't always give the same src name, however, it is always an error due to the Permission Denied.

I tried everything with the Firewall (solution from internet), but nothing succesful until now. Does anyone have an idea?

Best Answer

Sorry, but this kind of questions is not answerable on a valuable level. The issue is in most cases not related to MiKTeX installer itself, not speaking of TeX in general.

Possible reasons for problems are:

  • a problem of user rights (writing access forbidden for simple users). A solution can consist in installing not in C:\Program Files (or the (x86) companion), because then the UAC (user access control) will not be involved. A simple user can always install in his %UserProfile% (the problem could then be an institutional size limit).
  • a Firewall. Solution: deactivate firewall or better, when possible, set a temporary exception.
  • an Antivirus program. Solution again: deactivate program or better, when possible, set a temporary exception.
  • a temporary problem of the MiKTeX.org (at least one subdomain is called on every installation or update when “the nearest” repository, i.e. a random one, is selected, cf. Can I avoid connecting to MiKTeX update server?). Then you only could wait and try again after some time.
  • a corrupt installation file. This could be caused by
    • the installer itself (back in past sometimes the installer had a flaw). Then only an installer update would help.
    • the MiKTeX download mirror, that could host corrupt files for unknown reasons. Choose a different one.
    • the downloading to your computer, which can be responsible for breaking files especially when Proxies are involved. Try to download without Proxies or at least check settings of your installer (cf. update 2 in this question: MiKTeX: connect failed in tcp_connect).

In praxis a combination of these is probable.