miktex -next: Windows API error 5: Zugriff verweigert
MiKTeX source code moved to GitHub
Brought to you by:
csc
I have miktex installed as single user in a account with restricted rights.
Yesterday I changed on a windows 10 to the next repository (to test something with the new luatex). The update manager had a few package unselected. The first update worked fine, but when I run the update manager to get the rest of the packages I get a Windows API error 5: Zugriff verweigert error as miktex seems to try to access the path="C:\Program Files (x86)\MiKTeX 2.9" for which my account has no rights.
I get the same error when trying to use the package manager. It doesn't matter if I use the next or another repository.
I haven't tried yet if using admin rights avoids or solves the problem.
Funny, when I run update wizard all packages are selected. There are no unselected packages. After the update (to NEXT), everything seems to work.
In my case packages like bidi, boondox, footnotehyper and some other weren't selected. But I was away for two weeks and so hadn't run the update manager for some time.
Currently I'm stuck: When I choose the next repository I get the api error directly, and if I choose the normal repository I see the list of packages, I can start the download of e.g. bidi but it ends with the api error too. I will try tomorrow to make a trace to find out why miktex tries to acces c:/program files.
Thanks, I am now able to reproduce the issue.
The problem is: the latest update wizard tries to create this file:
I suspected something like this ... I can naturally run the update manager once with admin rights to get a new wizard, but at the end I want to be able to use miktex without admin right ;-).
I have fixed the bug. Your broken MiKTeX setup can be repaired with an intermediate version of the update wizard. Just download and run
x86: https://miktex.org/download/ctan/systems/win32/miktex/support/next/miktex-update.exe
x64: https://miktex.org/download/ctan/systems/win32/miktex/support/next/x64/miktex-update.exe
Please note: The download will be available in a few hours (after the nighlty CTAN sync).
Last edit: Christian Schenk 2016-10-16
I was able to run the update and everything seems back to normal.
But I now saw that there are two different miktex-update.exe: The one with timestamp 16.10.2016 17.17 in miktex/bin is much smaller than the one in miktex/bin/internal (the one I downloaded). Which one should be used normally? Does it matter? (The original links in the start menu broke during a windows 10 upgrade, so I don't know how the state was when miktex was installed).
The small one is a hardlink: