I installed MiKTeX 2.9 on windows 7 but I was not able to compile files in Texmaker. Then I installed TeX Live, which is working fine. Now when I try to uninstall MiKTeX from Control panel, it gives following error: "Windows API error 5: Access is denied". How to uninstall it now. I am beginner in LaTeX.

  • 2
    Did you try to uninstall as administrator? – Bernard Mar 3 '15 at 16:02
  • 2
    I opened control panel and right clicked on the program and tried Uninstall. How can I uninstall as admininstrator. – Ehsa Mar 3 '15 at 16:13

I suppose you have a standard installation. Go to C:\Program Files\MiKTeX 2.9\miktex\bin\x64\internal\. Right-click on uninstall_admin.exe and select Execute as Administrator.

If you have MiKTeX 32 bit, go toC:\Program Files (x86)\MiKTeX 2.9\miktex\bin\x64\internal\.

  • I followed the above steps but it gives an error: The IniTeXMF executable could not be found – Ehsa Mar 3 '15 at 16:33
  • I'm puzzled… Try to execute uninstall.exe (as administrator). – Bernard Mar 3 '15 at 16:37
  • Did that as well. The error is same. – Ehsa Mar 3 '15 at 16:39
  • Perhaps your installation was buggy? It's strange you couldn't compile from TeXmaker. – Bernard Mar 3 '15 at 16:46
  • 1
    I had a similar issue: I installed MiKTeX without admin rights and only uninstall.exe works (without starting it as admin). – Dr. Manuel Kuehner May 25 '18 at 22:00

I had the same Windows API (application programming interface?) error as above. I dragged the entire MiKTeX 2.9 folder to the trash and then went to the "Change or remove a program" option from Control Panel. MiKTeX 2.9 was still on the list, but when I clicked "Uninstall", I got a message saying that it may already be uninstalled and asked whether I'd like to remove it from the list of Programs - I clicked "Yes".

It seems to be gone!

  • 3
    Hmmm... so you deleted MiKTeX and you can still compile? That's odd. Is this at all helpful? – Werner Feb 26 '17 at 6:54

protected by Martin Scharrer Nov 20 '18 at 6:34

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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