Installation of SQL server 2008 with Framework 4 installed
Posted: Mon Dec 12, 2011 6:37 am
Hi,
In my installer I check if Framework 2 is installed as a pre-requisite for SQL server 2008.
But when a server has Framework 4 installed (without having Framework 2 installed), than my installion can't proceed.
Framework 2 aparently can't be installed if Framework 4 is already installed.
How can I solve this?
In my installer I check if Framework 2 is installed as a pre-requisite for SQL server 2008.
But when a server has Framework 4 installed (without having Framework 2 installed), than my installion can't proceed.
Framework 2 aparently can't be installed if Framework 4 is already installed.
How can I solve this?
Code: Select all
[DEFINE REGION: Check/Install Application Pre-Requisites]
[DEFINE REGION: Check Application Pre-Requisites]
Comment: Check setup pre-requisites
Set Variable PREREQ to FALSE
Set Variable PRELIST to
Set Variable REBOOTBP to FALSE
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Uninstallation
end
if Variable BP_IS64 Equals TRUE
Include Script: checkmsi45_x64
Include Script: checknet20sp2_x64
Include Script: checksql2008r2_x64
else
Include Script: checkmsi45
Include Script: checknet2sp2
Include Script: checksql2008r2_x86
end
[compiler end]
<<Code Folding Region>>
[DEFINE REGION: Install Application Pre-Requisites]
Comment: Install setup pre-requisites
if Variable PREREQ not Equals FALSE
Display Dialog: prereq, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
Terminate Installation
end
Display Dialog: progressprereq, use as progress dialog (non-modal)
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Set Variable REMOVEOLD to
Set Variable ERROROLD to
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
if Variable REMOVEOLD Equals ERROR
MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
Terminate Installation
end
if Variable REMOVEOLD Equals REBOOT
MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
if Variable REBOOTNOW Equals OK
Reboot Computer and Resume Setup
else
Terminate Installation
end
end
Set Variable MAINTENANCE to FALSE
end
[DEFINE WEB MEDIA Microsoft Windows Installer 4.5 (x64), Exclude from Build]
if Variable BP_IS64 Equals TRUE
Include Script: setupmsi45_x64
end
[DEFINE WEB MEDIA Microsoft .NET Framework 2.0 with Service Pack 2 (x64), Exclude from Build]
if Variable BP_IS64 Equals TRUE
Include Script: setupnet20sp2_x64
end
[DEFINE WEB MEDIA Microsoft SQL Server Express 2008 R2 (x64), Exclude from Build]
if Variable BP_IS64 Equals TRUE
Include Script: setupsql2008r2_x64
Comment: Instellen Firewall, hiervoor wisselen naar 64 Bit modes.
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Read Registry Key HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10_50.BALANCEDPLUS2008\Setup\SQLBinRoot into BP_SQL_PATH
Does File Exist $BP_SQL_PATH$\sqlservr.exe (get result into variable BP_SQL_EXISTS)
if Variable BP_SQL_EXISTS Equals TRUE
if Variable BP_FIREWALL_ADVANCED Equals TRUE
Run Program netsh advfirewall firewall add rule name="SQL Server (BALANCEDPLUS2008)" dir=in action=allow program="$BP_SQL_PATH$\sqlservr.exe" enable=yes profile=any description="Allows inbound Microsoft SQL Server dynamic ports, set by BALANCEDPLUS2008 ERP Installer" (WAIT, get result into variable BP_FIRWALL_OK)
Run Program netsh advfirewall firewall add rule name="SQL Server browser (BALANCEDPLUS2008)" dir=in action=allow protocol=UDP localport=1434 profile=any description="Allows inbound Microsoft SQL Server browser, set by BALANCEDPLUS2008 ERP Installer" (WAIT, get result into variable BP_FIRWALL_OK)
else
Run Program netsh firewall add allowedprogram "$BP_SQL_PATH$\sqlservr.exe" "SQL Server (BALANCEDPLUS2008)" ENABLE (WAIT, get result into variable BP_FIRWALL_OK)
Run Program netsh firewall set portopening UDP 1434 "SQL Server browser (BALANCEDPLUS2008)" (WAIT, get result into variable BP_FIRWALL_OK)
end
else
MessageBox: SQL Server (BALANCEDPLUS2008), $TITLE$ Setup - Warning: Not able to set an exception for the firewall. "SQL Server (BALANCEDPLUS2008)" not exists in the expected directory which is: $BP_SQL_PATH$\sqlservr.exe.
end
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end
[DEFINE WEB MEDIA Microsoft Windows Installer 4.5, Exclude from Build]
if Variable BP_IS64 Equals FALSE
Include Script: setupmsi45
end
[DEFINE WEB MEDIA Microsoft .NET Framework 2.0 with Service Pack 2, Exclude from Build]
if Variable BP_IS64 Equals FALSE
Include Script: setupnet2sp2
end
[DEFINE WEB MEDIA Microsoft SQL Server Express 2008 R2 (x86), Exclude from Build]
if Variable BP_IS64 Equals FALSE
Include Script: setupsql2008r2_x86
Comment: Setze Firewall
Read Registry Key HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10_50.BALANCEDPLUS2008\Setup\SQLBinRoot into BP_SQL_PATH
Does File Exist $BP_SQL_PATH$\sqlservr.exe (get result into variable BP_SQL_EXISTS)
if Variable BP_SQL_EXISTS Equals TRUE
if Variable BP_FIREWALL_ADVANCED Equals TRUE
Run Program netsh advfirewall firewall add rule name="SQL Server (BALANCEDPLUS2008)" dir=in action=allow program="$BP_SQL_PATH$\sqlservr.exe" enable=yes profile=any description="Allows inbound Microsoft SQL Server dynamic ports, set by BALANCEDPLUS2008 ERP Installer" (WAIT, get result into variable BP_FIRWALL_OK)
Run Program netsh advfirewall firewall add rule name="SQL Server browser (BALANCEDPLUS2008)" dir=in action=allow protocol=UDP localport=1434 profile=any description="Allows inbound Microsoft SQL Server browser, set by BALANCEDPLUS2008 ERP Installer" (WAIT, get result into variable BP_FIRWALL_OK)
else
Run Program netsh firewall add allowedprogram "$BP_SQL_PATH$\sqlservr.exe" "SQL Server (BALANCEDPLUS2008)" ENABLE (WAIT, get result into variable BP_FIRWALL_OK)
Run Program netsh firewall set portopening UDP 1434 "SQL Server browser (BALANCEDPLUS2008)" (WAIT, get result into variable BP_FIRWALL_OK)
end
else
MessageBox: SQL Server (BALANCEDPLUS2008), $TITLE$ Setup - Warning: Not able to set an exception for the firewall. "SQL Server (BALANCEDPLUS2008)" not exists in the expected directory which is: $BP_SQL_PATH$\sqlservr.exe.
end
end
[compiler end]
Hide Dialog
end
<<Code Folding Region>>