Detecting .NET Framework 2.0 runtime env.

  • Thread starter Thread starter Ron M. Newman
  • Start date Start date
R

Ron M. Newman

Hi,

You install a .NET 2.0 winforms application on a machine that doesn't have
the 2.0 redistributables and then run it. How do you elegantly detect that
and warn your users? Any way to avoid ugly uncontrollable error boxes?

Thanks
Ron
 
Ron said:
You install a .NET 2.0 winforms application on a machine that doesn't have
the 2.0 redistributables and then run it. How do you elegantly detect that
and warn your users? Any way to avoid ugly uncontrollable error boxes?

That's kind of a vicious circle! If the .Net Framework 2.0 is not
installed, your program will not run anyway, so it cannot detect if the
framework is there. You might be able to create some sort of launcher
app in C++ native code that can check for the framework and if present,
it launches the app.
 
Yeah, i thought about it. So assuming I am creating a typical Win32 app
that'll launch the .NET executable, what do I look for in order to make sure
the .NET 2.0 is properly installed? any magical registry element I can refer
to? a file somewhere? what would be the most reliale check?

Ron
 
Hello Ron,

Read there http://laflour.spaces.live.com/blog/cns!7575E2FFC19135B4!393.entry

RN> Yeah, i thought about it. So assuming I am creating a typical Win32
RN> app that'll launch the .NET executable, what do I look for in order
RN> to make sure the .NET 2.0 is properly installed? any magical
RN> registry element I can refer to? a file somewhere? what would be the
RN> most reliale check?
RN>
RN> Ron
RN>
RN> RN>---
WBR,
Michael Nemtseva [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 
Hello Ron,
You install a .NET 2.0 winforms application on a machine that doesn't have
the 2.0 redistributables and then run it. How do you elegantly detect that
and warn your users? Any way to avoid ugly uncontrollable error boxes?

Your installer should notice that a requirement for your application is
not fulfilled on the system and either refuse to install the application
or install the .NET Framework 2 before installing the application.


Oliver Sturm
 
Back
Top