Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

detect framework dot NET


1 reply to this topic

pavlacki

pavlacki
  • Members
  • 15 posts

Posted 04 April 2005 - 15:14

Hello,


I am very new with installShield.
I build an install that need the framework .net.
In the relaese wizard, I the setup dot.NET.

The install begin,
It propose me to install the framework.

My question is quit simple, I want to test if the framework is not yet installed?
so where must I include this test condition.

In the Release wizard there is no option to check if there is a previous version?


Thanks in advance.


jrcoldinmn

jrcoldinmn
  • Members
  • 16 posts

Posted 04 April 2005 - 19:21

I used the code below in the OnBegin InstallScript to test for the Framework and then test for the service pack. If the Framework is not installed, I abort. If SP1 is not installed, I LaunchAppAndWait the .exe to install it. You may be able to modify it for your use. NOTE: I test for REMOVEALLMODE to make sure that I'm not here doing an uninstall.

svFolder = "Software\\Microsoft\\NET Framework Setup\\NDP\\v1.1.4322";
if REMOVEALLMODE == 0 then
if RegDBKeyExist (svFolder) < 0 then
MessageBoxEx ( "Microsoft .NET v1.1 not installed!", "", SEVERE );
abort;
endif;
RegDBGetKeyValueEx ( svFolder, "SP", nvType, svValue, nvSize );
if ( svValue != "1") then
szTarget = SRCDISK ^ "\\" ^ "NDP1.1sp1-KB867460-X86.exe";
LongPathToQuote(szTarget, TRUE);
LongPathToQuote(szApplication, TRUE);
LaunchAppAndWait (szTarget,"",LAAW_OPTION_WAIT);
endif;
endif;