Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Installation error for MikTex in Windows 7

Help
P G
2010-12-12
2013-08-14
  • P G
    P G
    2010-12-12

    I have been trying to install MikTex onto my Windows 7 32-bit machine without
    any success. I have tried MikTex versions 2.7 and 2.8 to no avail. I keep
    getting an error:
    "The operation could not be completed for the following reason:
    The operation failed for some reason.
    Details: C:\MikTex2.8\miktex\bin\initexmf.exe"

    I had a previous error of Windows API error 5 but changing the installation
    directory to C:\MikTex2.8 helped with that error.

    Any help is appreciated.

     
  • mcescutt
    mcescutt
    2010-12-14

    are you administrator of in to session ?

     
  • Gosane
    Gosane
    2010-12-15

    I get the same error after updating Miktex 2.9 on Windows XP.

     
  • Gosane
    Gosane
    2010-12-15

    Here are the corresponding lines in the logfile (I am administrator on the
    session) :

    problem: C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-core-PS.dll does not
    exist
    problem: C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-core.dll does not
    exist
    problem: C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager-
    PS.dll does not exist
    problem: C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager.dll
    does not exist

    Registering root directories...
    "C:\Program Files\MiKTeX 2.9\miktex/bin\mpm.exe" --register-components --admin
    --verbose:
    configuring fontconfig\config\fonts.conf
    registering C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-core.dll
    registering C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-core-PS.dll
    registering C:\Program Files\MiKTeX
    2.9\miktex/bin\MiKTeX209-packagemanager.dll
    registering C:\Program Files\MiKTeX 2.9\miktex/bin\MiKTeX209-packagemanager-
    PS.dll
    "C:\Program Files\MiKTeX 2.9\miktex/bin\initexmf.exe" --update-fndb --admin
    --log-file="C:\Program Files\MiKTeX 2.9\miktex\config\uninst.log" --verbose:
    Skipping user root directory ("C:\Documents and Settings\xxx\Application
    Data\MiKTeX\2.9")...
    Skipping user root directory ("C:\Documents and Settings\xxx\Local
    Settings\Application Data\MiKTeX\2.9")...
    Creating fndb for common root directory ("C:\Documents and Settings\All
    Users\Application Data\MiKTeX\2.9")...

    Creating fndb for common root directory ("C:\Program Files\MiKTeX 2.9")...
    "C:\Program Files\MiKTeX 2.9\miktex/bin\initexmf.exe" --force --mklinks
    --admin --log-file="C:\Program Files\MiKTeX 2.9\miktex\config\uninst.log"
    --verbose:
    Making format links...
    Making script links...
    C:\Program Files\MiKTeX 2.9\miktex/bin\miktex-taskbar-icon.exe
    C:\Program Files\MiKTeX 2.9\miktex/bin\miktex-update.exe
    "C:\Program Files\MiKTeX 2.9\miktex/bin\initexmf.exe" --mkmaps --mklangs
    --admin --log-file="C:\Program Files\MiKTeX 2.9\miktex\config\uninst.log"
    --verbose:
    Creating language.dat, language.dat.lua and language.def...
    initexmf.exe: Windows API error 5: Accès refusé.

    An error occurred:
    source file: Libraries\MiKTeX\Core\Process.cpp
    source line: 296
    message: The operation failed for some reason.
    info: C:\Program Files\MiKTeX 2.9\miktex/bin\initexmf.exe

     
  • rIrving
    rIrving
    2010-12-15

    Ouch. Same error here (XP SP3). Also occurs with a format rebuild:

    MiKTeX Problem Report
    Message: Windows API error 5: Access is denied.

    Data:
    Source: Libraries\MiKTeX\Core\win\winProcess.cpp
    Line: 810

     
  • sinnadyr
    sinnadyr
    2011-09-21

    The Windows API error 5 is because you do not have admin rights when running
    the installation

     
  • 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.