The application failed to initialize properly (0xc0000022).

I started receiving the error The application failed to initialize properly (0xc0000022) on my primary development machine (running Windows XP SP3) whenever I tried to launch select applications (cmd.exe, SecureCRT, runas.exe, mmc.exe, etc).  It had been a while since my last reboot and I had installed a some new programs and the latest Windows Updates, so I assumed it was related to that.

One reboot later and some applications (cmd.exe) would launch, but many others still wouldn't.  A quick Google search showed that this was often related to the permissions being incorrect on some core system DLLs.  No problem, find the DLLs, right click, properties.  And the Security tab was missing.  The most common cause of this is that Simple File Sharing is enabled.  Except it wasn't. I toggled that off/on, and still the Security tab was missing.  Enter CACLS - a command line utility to view/edit file ACLs.

Fixing Windows DLL Permissions

Windows is trying to load a DLL that the application depends on, and something is preventing it.  Given that the Security tab was missing from an Explorer Properties window, my guess would be that a DLL that controls ACLs and permissions had restrictive or corrupted permissions.

The CACLS commands below modify all .dll and .ocx files inside the system32 directory and grant members of the Users group Read access.

  • As an Administrator open a command prompt - Start > Run > cmd
  • Inside the command prompt window type:
    CACLS %systemroot%\System32\*.dll /E /G BUILTIN\Users:R
    And press Enter.  This will take a minute or so and will display a slew of processed file: C:\WINDOWS\System32\blah.dll messages.
  • Then type:
    CACLS %systemroot%\System32\*.ocx /E /G BUILTIN\Users:R
    And press Enter.

After both commands completed I was immediately able to launch all of the previously non-functional applications.

Application DLL Dependencies

Here are the top-level dependencies for some of the applications that were not working properly.

The reason I chose to modify all of the DLLs was pure laziness - SecureCRT has 135 DLLs it depends on, VMware Workstation has 157, cmd.exe has 130.  If you are aiming for precision use the excellent Dependency Walker and load each application.  Copy the DLLs with full paths, remove anything outside of %systemroot%\system32 and then find the common shared DLLs from list.  Use the same CACLS command (CACLS %systemroot%\System32\FILENAME /E /G BUILTIN\Users:R) for each of those files.

 

Tags: , ,

11 Responses to “The application failed to initialize properly (0xc0000022).”

  1. Brent Says:

    I had this same exact problem today on 2 machines. I rebooted them for the first time since updates were applied (August's). Running the commands seems to fix the problems, but it came back on its own w/o a reboot of the machine. Sometimes the security tab is missing and sometimes its not. Have you had anymore problems with your machine?

  2. scotty Says:

    Many thanks for this - I got hit with this on one machine today
    Although the solution is out there on a number of other sites this one seemed to lay it out (and have exactly the same symptoms as me) well
    Thanks

    Regards

  3. Brent Says:

    My issue was caused by an update to NOD32 AV. Signature version 3435 caused the entire issue that had the exact same symptoms as this.

  4. Scotty Says:

    ..interesting…
    We use NOD as well - at 3437 presently, have got a lot of machines out there with this installed on, hope we've not a big problem on the way..

  5. Corey Says:

    Interesting. I'm running NOD32 also, I didn't think to check that. About an hour after I posted this the problem reoccurred, and then the power supply in my computer died. I replaced that and when I rebooted the problem was gone. I wasn't paying attention, but it's entirely possible that there was a NOD32 update that was automatically applied when I booted up on the new PSU.

  6. Scotty Says:

    We got this reply from Eset support:

    "There was a problem with update 3435 and it actually got pulled from the servers, it appeared to affect users trying to logon to a network environment, this was fixed with 3436 and only seemed to affect north America as they were the only ones working in that kind of environment so we did not see the same issues in the rest of the world as such.

    It also seem to only affect v3.0.657, you should make sure that you have the latest build of the software installed currently v3.0.672
    "

  7. Scotty Says:

    Doesnt look like a good week for Eset - they released a firewall update last night which has broken one of our custom in-house apps.
    Not related to this issue, but the reply from Eset was;

    "We released a firewall update overnight and it does seem to have caused some issues. Our developers will be releasing a FIX shortly so if you can bear with us the fix should hopefully sort your issues out.

    "

  8. Pedro Antonio Says:

    I had the same problem. After I read the comment about Nod32 I desintalled all antiviruses that I had in my computer. Then I can run the programs, specially Word, Excel and Powerpoint. Me too did this post: http://foro.noticias3d.com/vbulletin/showthread.php?t=203069. Thanks for all.

  9. Paige Says:

    I have a vista home premium system and tried this fix… my system will not run windows internet explorer. Any other suggestions besides me throwing my laptop out the window>>>

  10. Johnny Anderson Says:

    I got this (0xc0000022) msg every time I click on Safari, IE or Firefox. I can go on line with Net Zero BUT no browser opens up. I tried the above suggestion in the RUN box and the errors are still coming up. All of this has come onto my desktop since I did a lot of windows updates last week, including service pack 3.

    If anyone has any suggestions, please email me a johnnyboy1@rocketmail.com as I cannot get on the Net with my desktop right now. I also tried Regcure and got nowhere with that either, thanks for anyone's help out there.

  11. class mates Says:

    I haven't had any problems since I started running Linux almost eight years ago. Try it, you might start to enjoy it.

Leave a Reply