Detecting installed progs and versions...

  • Thread starter Thread starter Jodie Rapson
  • Start date Start date
J

Jodie Rapson

Hi all,

Can someone plaese tell me the best way to go about detecting if the .Net
Framework is installed on a machine and what version. Also the same thing
for internet explorer.

Thanks in advance.

Jodie Rapson
 
From where and when?

From the web you can use the useragent property of the webrequest and
parse the returned string. Although that wont tell you if IE is
installed if the user is accessing the page with Netscape.

Locally, you could just search for the executable name or registry
keys for IE although theres probably a more efficient way.

Locally obviously you couldn't run a check on the framework from
Vb.net if it wasn't installed so thats a pretty good clue. Versions
you can get through the Environment.Version property.

During installation of an application you could use launch conditions
see: deployment in the docs.

You can also use the .config file to specify the apps installed
framework requirements through the

<startup>
<requiredRuntime>
<supportedRuntime>

elements.

hth
Richard
 
Thanks Richard, I was referring to finding these locally sorry. Yes I
managed to follow my nose and found this article
http://support.microsoft.com/default.aspx?scid=kb;[LN];315291 that is a
walkthrough for detecting the Framework version using deployment conditions
and this seems to work fine. I can't manage to get it to work the same for
IE though, but I imagine I will suss that out. On another note I am
absolutely baffled as to why I can't add an internet shortcut as a file to a
setup project! Not even in the Favourites folder! I really would like to
know how to, any ideas I don't even know where to post this sort of
question.

Thanks Again

Jodie Rapson
 
Hi Jodie

For IE launch condition help go here:

http://msdn.microsoft.com/library/d.../vbtskcreatinginstallerforyourapplication.asp

and then scroll down page to "Adding Launch Conditions" subheader.


You would think the internet shortcut would be easy but i cant find
any info on it and ive never had to do it in the projects Ive
deployed. I suspect the block is for the purposes of security. The
best i can suggest at this point is to use a custom action to install
the shortcut during deployment. I'll mail you and update this thread
if i discover an easier way.


hth
Richard
 
Thanks Richard, this works good. In regard to the shortcut scenario, this
was posted in the frame work group as a resolution:

"It's a problem with the dialogs used. One way is to rename it, add it, and
rename it.
-mike
MVP"

I also had another reply which basically told me to use a normal .html
document with some javascript inside that redirects to the required URL.
These both seem to work.

Thanks again

Jodie Rapson
 
Back
Top