Detecting Whether dot net runtime is installed

  • Thread starter Thread starter sanket gupta
  • Start date Start date
S

sanket gupta

Hi ,
When installing my application , i want to check whether the dot net
runtime is available on the users computer and if its not , then i would
like to provide him with a download location.
What is the easiest way to do it?
Thanks/Regards
Sanket Gupta
 
When installing my application , i want to check whether the dot net
runtime is available on the users computer and if its not , then i would
like to provide him with a download location.
What is the easiest way to do it?

Check for the presence of mscoree.dll in your %system32% directory. If
it's there, you most likely have the .NET framework installed - if
it's missing, then you don't have the .NET framework.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Well, if its not there, you're app wont get far would it.

Well, you'd have to have a NON-.NET app to test it, of course!

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Its something strange.
So to run a Dot net application , we actually need to runa native
application.
Could not microsoft just put in a small piece of code in the exe to
check for and then help in downloading the code.
Microsoft are usually smart people.I dont know how they got confused in
this one.
So what do u all say?
should i use a small vc++ exe to check for the runtime and then take the
user to the download location if required?

would this be the best solution or can we do better?

Thanks for all your help
Regards
Sanket Gupta
 
Not always, I can name a huge list of "not so smart" people at microsoft. In
theyre satallite offices which will go unnamed:D

MIBU :D


--

Jack Mayhoff
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
So to run a Dot net application , we actually need to runa native
application.

No, you don't need to do that - you might need to resort to a native
app to determine whether or not the .NET framework is installed. To
actually RUN the .NET app, you don't need this - the .NET app will run
just fine (or crash, if the framework is missing).
Could not microsoft just put in a small piece of code in the exe to
check for and then help in downloading the code.

Yes, they could - but that would be good ONLY in the very RARE case
where you don't have the .NET framework installed - once it's
installed, and everything's good to go, you would keep on checking for
a condition that's already fulfilled - pretty pointless IMHO.

It comes down to a matter of installation / deployment - in order to
properly run .NET apps, you need to make sure the .NET framework is
there and ready - for now, that's a bit of a pain, since most likely,
it's not there yet. In a couple of years, the .NET framework will be
delivered with all new WIndows versions, and you won't even have to
think about that anymore.

So for now - just make sure YOUR installation checks for the presence
of .NET, and if it is missing, offers to install it. This is
definitely a good feature for any installers out there - check for the
..NET framework and install if needed. But I really don't think it
should be part of all your .NET apps, and their app loader.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
You have a runtime for C installed, and probably VB, and WSH, so why do
people make a big deal out of the CLR?

They already have runtimes installed yet they say the DONT WANT ANY?
Ignorance at its best. If they dont want the .NET CLR they can use other
CLRs that are out there or roll theyre own, since they are whining pussies
 
You have a runtime for C installed, and probably VB, and WSH, so why do
people make a big deal out of the CLR?

True enough.... plus they keep installing patches and service packs
left, right and centre - but not the .NET runtime........ odd........

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Hi
I agree with all of you.
But the question is how do i make it work on the pc of an innocent
customers who knows nothing about what the .net runtime is and what is
it for.
I want to be sure that they just dont dump my software because they get
an error like ->Cannot find abc.dll

Whats the best solution to encounter the problem?
Thanks/Regards
Sanket Gupta
 
Back
Top