Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2208 Windows API error 5: “Access is denied” after fresh reinstall

unreproducible
None
2014-04-07
2013-01-07
doncherry
No

I just reinstalled MiKTeX basic 32bit on Windows 7 64bit. Beforehand, I had thoroughly cleaned up the remainders of the previous installation. The installation went smoothly, but right afterwards, I wanted to update the packages, but I got an error "The operation could not be completed for the following reason: Windows API error 5: Zugriff verweigert. Details: C:\". After changing the permissions as described in http://tex.stackexchange.com/a/78674/4012, everything worked fine.

1 Attachments

Discussion

    • status: open --> unreproducible
    • assigned_to: Christian Schenk
     
  • I followed your description step-by-step but I cannot reproduce the problem.

     
  • jwq
    jwq
    2013-07-01

    I encountered the same problem with a fresh install of MikTeX 2.9 on a Windows 7 machine for my user account only. I am admin.

    Trying to change permissions did not work, but uninstalling and reinstalling for "All Users", as advised later in that Stack Exchange tread, saw me able to update MikTeX.

    Judging by the large number of reports of this problem, I think this is a bug which needs to be taken seriously and fixed.

     
  • The problem is that in Windows-MiKTeX the following code:

    (attributes & FILE_ATTRIBUTE_READONLY) != 0

    (search for it in *.cpp files) does not function correctly (e.g. install MikTeX to the program folder and then try to run it without admin rights). After replacing the above code with:

    true

    the compiled MiKTeK does run without admin rights. Of course, there should be a better solution, replacing the code with something that supplies the correct answer to the read-only question.

     
  • voks
    voks
    2014-04-07

    The problem occurs when you install MiKTeX for the current user only, but in a folder like "program files" (admin access only). MiKTeX tries to install new packages to that folder then, without access of course. That's the problem. Instead MiKTeX should install the packages into the user's appdata folder in my opinion: %AppData%\Roaming\MiKTeX\2.9. Alternatively it should ask for admin rights before trying to access the program files folder.

    With the given configuration the same error occurs when trying to uninstall MiKTeX.

     
    Last edit: voks 2014-04-07