Application failed to initialize properly - Using a custom installer - Error CxC0000135

257 Views Asked by At

A software application and a custom installer has been created using VB.NET.

When I run the Setup.exe (the custom installer) on the user's workstation, it gives the following error:

Application failed to initialize properly CxC0000135

I realize that this is because .NET Framework is required to be installed on the the workstation.

Currently, the solution is to: install the .NET framework, and then run the custom installer. This is obviously not a user friendly way to install the application.

What solution can be used to reduce the effort of the user to install the application?

2

There are 2 best solutions below

0
On

Well, you can't run an executable that was written in a managed environment (.NET in this case) to check if this environment exists. You will either have to write a script, that will check for registry entries or use an alternative language (which uses libraries natively supported in the system, therefore, you will have to write your application in unmanaged code) to write the checking application.

Only thing I would add is to find the dir this way for maximum flexibility From CMD:

 %windir%\Microsoft.NET\Framework\v3.5
0
On

As Al-3sli mentioned, the custom installer needs to be a script or a program written in another language that uses libraries supported natively by the system.

It needs to check if .NET framework is installed. This is usually determined by checking the registry as described here: How to: Determine Which .NET Framework Versions Are Installed

Here is sample code in C++ that does this:

Sample code to detect .NET Framework install state and service pack level