Customizing the default "The application failed to initialize properly (0x00000135)" message

2

When the .net framework cannot be found, the following message is displayed:

"The application failed to initialize properly (0x00000135)"

Is there a way to make it a tiny bit more specific (instead of writing a wrapper in another language), eg. by telling the user about the .Net fx?

vb.net
.net
asked on Stack Overflow Oct 9, 2010 by Clément • edited Jun 27, 2017 by Clément

1 Answer

2

I believe that the "failed to load" error message is thrown by Windows loader (via Explorer.exe). So, I think there's no way to customize/control the error dialog box and its contents. I can think of few other methods:
- Add .NET version detection in installer package so that installer can inform user to download and install .NET framework if it's not present already.
- Write a stub application in unmanaged code which launches the .NET binary (using APIs like CreateProcess). In this stub, you can check for .NET framework and then display more descriptive error code.

Here's an example that shows how to detect .NET framework and its version:
http://www.codeproject.com/kb/dotnet/DetectDotNet.aspx

answered on Stack Overflow Nov 7, 2010 by swatkat

User contributions licensed under CC BY-SA 3.0