none
Error R6030 CRT not initialized. Solved by administrator privileges?

    Question

  • Hi All,

    I support a software development product that links to the VC 9.0 Runtime. A customer is reporting an error R6030 CRT not initialized when running his application that is built with our compiler. This only occurs when he is linking a third party DLL. However, he does not get this error when running the same code when compiled in MSVC. I can provide much more information if necessary.

    I've read a lot about potential causes for this, but I have not been able to come to any solid conclusions. A common solution I find to this error is to run the app as Administrator on Windows 7, and this works! However, running as admin is not an acceptable solution for my customer, so I was wondering if anyone knew a reason why running as admin fixes the problem?

    Another common solution is to run a registry cleaner (one of these shady freeware apps that "cleans" your registry of corrupt data). What registry keys could be corrupted that would cause this problem?

    As I said, I have done a lot of searching for a solution on the web, and have found many solutions, but no reasons why these solutions work. Can anyone shed some light? I think an understanding of why running as admin fixes the problem will be key to understanding what the problem is to begin with.

    Monday, July 16, 2012 9:14 PM

All replies

  • Hi DBiel,

    Welcome to the MSDN forum.

    Based on your description, your products have some problem that may need administrator privileges.

    That maybe because your application has invoked some API which must trigger User Account Control UAC .

    In Visual Studio: Property Pages-> Configuration Properties-> Linker-> Manifest File, you can select /MANIFESTUAC:level.

    Here is a Comprehensive link about UAC : http://msdn.microsoft.com/en-us/magazine/cc163486.aspx

    I hope my suggestions will help.

    Regrads,

    Elegentin


    Elegentin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 18, 2012 10:29 AM
    Moderator
  • Thank you for your response Elegentin.

    I read the document you posted, but I still have not found my answer. The manifest is a good way to elevate an app to admin, but my problem is with why the app needs to run as admin to begin with.

    Specifically, how does the error R6030 CRT not initialized relate to admin privileges. I've never come across this error even if I had an app that required admin privileges that I did not elevate (I typically get some other kind of error).

    Are there any registry keys you need access to in order to initialize the CRT? Or maybe this is a bogus error than can be thrown by a version conflict?

    Thursday, July 19, 2012 10:22 PM
  • I read the document you posted, but I still have not found my answer. The manifest is a good way to elevate an app to admin, but my problem is with why the app needs to run as admin to begin with.

    I agree. You need to find out where privileges are being denied when running the application as a regular user.

    I think the proper approach to troubleshoot is to turn on security logging on the target operating system. You can run the application once so that it fails, and then examine the system's event log to find out what is being denied.

    Security logging is largely turned off by default. To turn it on, some instructions can be found below:

    http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/Security/EnableSecurityLogging.html

    http://support.microsoft.com/kb/300549

    Hope this helps.

    Thursday, July 19, 2012 10:54 PM
  • Hi,

    Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 25, 2012 4:53 AM
    Moderator
  • Hi guys, thanks for the suggestions so far and the willingness to help. I don't have any results yet. I have not been able to reproduce this issue, so I am working with my customer on the troubleshooting as well as pursuing some other options. I'll let you guys know if I get any results.
    Friday, July 27, 2012 3:15 PM
  • Hi,

    I would suggest you to provide us a sample to reproduce this issue, so that we can analyze this from codes.

    As your customer's environment is different, so you can try to up customer's system to data, reinstall your application and CRT 10, and turn off the anti-virus software.

    Hope these help.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, July 30, 2012 6:24 AM
    Moderator
  • Hi Everyone,

    Sorry I have not posted back in awhile. I have figured out at least a general idea of what is happening. There was another application on the system that was hooking into my DLL. This other application was one of those security software packages that is installed by the manufacturer (two different manufacturers' software caused the same problem). This was causing a problem when another third party DLL was being load-time linked to the executable that was attempting to run. Changing the link order of the 3rd party DLL (relative to other libraries like user32) resolved the issue. (disabling the security software also resolved the issue, but only for that system).

    In the end, I still have not gotten to the bottom of this issue, but I have a working solution.

    Thanks for the help.

    Tuesday, August 28, 2012 8:48 PM
  • Hello,

    Maybe you can ask help from the security software company for help. They should have a list to tell the developer which behavior allow in their security rules. The developer should follow that rules, so that it can work fine.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 29, 2012 8:49 AM
    Moderator