Menu

#1935 Windows API Error 2

closed
None
2014-08-29
2010-11-25
No

After innumerable failed attempts (at least twenty) at installing MiKTeX on Windows XP Home Edition into its default directory "C:\Program Files\MiKTeX 2.9", I decided to see if spaces in directory names were causing the installer to fail.

I installed MiKTeX into "C:\MiKTeX" and it went flawlessly.

Discussion

  • Christian Schenk

    Thank you for the report.

    Unfortunately, the problem isn't reproducible. At the moment
    I have not enough information to work on this problem
    effectively.

     
  • Anonymous

    Anonymous - 2010-11-25

    I tried to make it reproducible by uninstalling MiKTeX 2.9. I have now unsuccessfully reinstalled it about 30 times.

    Each time it errors out at a different spot when trying to unpack the files. I have uninstalled just about every program. I am trying MiKTeX 2.8 next. If it works, great, if not, I'm going to uninstall Java.

    Really at a loss as to why the program fails to unpack the files. Also, the log file never gets displayed. I don't see any way of debugging the issue here.

    Anything you can tell me to diagnose this issue would be much appreciated.

     
  • Christian Schenk

    I don't have many ideas. Two things I would try:

    Disable the virus scanner
    Create a DebugView log (see http://miktex.org/diagnosing)

     
  • Anonymous

    Anonymous - 2010-11-25

    I now know why you don't see the error. This should reproduce the problem:

    1. Uninstall any existing version of MiKTeX.
    2. Delete the MiKTeX directory.
    3. Download CCleaner.
    4. Run CCleaner.
    5. Click Analyze.
    6. Click Run Cleaner. (Accept confirmation dialogs.)
    7. Click Registry.
    8. Click Scan for Issues.
    9. Click Fix selected issues.
    10. Click No (unless you want to make a registry backup).
    11. Click Fix Issue.
    12. Click Close.
    13. Close CCleaner.

    At this point the registry is clean and MiKTeX has been uninstalled. Continue:

    1. Reboot (for good measure).
    2. Install MiKTeX 2.9 into C:\programs\MiKTeX.

    MiKTeX will fail during installation. Close all the dialogs then continue with:

    1. Delete C:\programs\MiKTeX.
    2. Reinstall MiKTeX.

    The reason developers won't see the problem is because there is something funky going on with the registry and existing registry keys. This is a guess.

     
  • John Peterson

    John Peterson - 2011-08-18

    csc did you try it in Windows 7 x64?

    I'm surprised there is no mention of windows version here. you should state windows version and if it's x64 or x86.

     
  • John Peterson

    John Peterson - 2011-08-18

    never mind, I didn't see there was a portable package.

    portable is perfect, just unzip and run and no registry and %AppData% clutter.

     
  • Yngve AAdlandsvik

    I think I've found the conditions where the install actually works:

    • HKEY_CLASSES_ROOT.pdf MUST exist
    • The (Default) value MUST be either not set or MikTex
     
  • Michael

    Michael - 2012-06-15

    This issue crops up randomly for me on Windows 7 64-bit, causing automated deployments to fail and tremendous frustration as a result of those failures. The installer will work for months, then error out for a day, only to work a few days later on the same machine. I’ve done some debugging, but the stack trace of the access violation doesn’t provide any clues.

    However, I appear to get consistently reliable, successful install results if I run it in Compatibility Mode. With a virtual machine, 2.9.4521 fails to install, but if I roll back to an earlier snapshot and set the Compatibility Mode to Windows Vista, it installs successfully.

    To install silently, I set the __COMPAT_LAYER environment variable. Hopefully, I am onto something and this “fix” isn’t just coincidental with the anomaly.

     
  • GreenAsJade

    GreenAsJade - 2012-10-18

    I wonder why this bug is closed? It is still clearly (?) an issue. At least, it happened to me over the last few days.

    Michael's workaround "set compatibility mode to Vista" worked. Yay! Thanks Michael!

    (Note that this is a real headache for packaged miktex installers such as LyX, which try to install miktex for you ... hard to intercept the miktex installer they download and set the compatibility mode)

     

    Last edit: GreenAsJade 2012-10-18
  • bkjhkjgjjkk4

    bkjhkjgjjkk4 - 2012-11-28

    Same issue here