Installshield LE Visual Studio 2012 Prerequisites

2019-04-16 02:50发布

问题:

When trying to build a deployment package using InstallShield LE project within Visual Studio 2012 how do we specify prerequisites. I see the Requirements section of the Project assistent but it seems this only gives the installer the functionality to go forward with the installation or not based on if certain prerequisites exist. It doesnt seem like it has the functionality to actualy install any of the prerequisites as part of the installation. As part of my installation package I am looking to install IIS 7.5 Express and SQL Server Compact 3.5 SP2.

When using Visual Studio 2010 Setup project we have the ability to actualy install the prerequisites as part of the installation package.

On the product page of InstallShield it says the LE version does support:

"Installation Prerequisites Check for and install prerequisites before your installation is executed."

Am I mising something?

回答1:

Take a look under (2) Specify Application Data | Redistributables. You'll find an extensive list of Setup Prerequisites.



回答2:

http://community.flexerasoftware.com/showthread.php?200816-Installing-IIS-as-a-Prerequisite-on-x64-OSs has a method for setting up a new pre-requisite file (.PRQ) that installs WAM and IIS. I've put the code here for posterity:

PRQ File

<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
    <operatingsystemconditions>
        <operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="4" ProductType="1"></operatingsystemcondition>
        <operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" Bits="4" ProductType="2|3"></operatingsystemcondition>
        <operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="4" ProductType="2|3"></operatingsystemcondition>
    </operatingsystemconditions>
    <files>
        <file LocalFile=".\Microsoft IIS\InstallWASandIIS.bat" CheckSum="3205F5B453D8E5FA8795280455BC6B97" FileSize="0,1983"></file>
    </files>
    <execute file="InstallWASandIIS.bat" returncodetoreboot="-1"></execute>
    <properties Id="{9724DBFD-9103-404F-BD53-6B29358C85EF}" Description="This prerequisite installs Windows Process Activation Services (WAS) and Microsoft Internet Information Services (IIS) on Windows 7 x64, Windows Server 2008 x64 and Windows Server 2008 R2 x64 operating systems for MET/TEAM."></properties>
    <behavior Reboot="32"></behavior>
</SetupPrereq>

BAT File

@echo off cls

@echo. @echo Windows Process Activation Services (WAS) and Microsoft Internet Information @echo Services (IIS) must be installed on this computer for it to be able to host
@echo the MET/TEAM website. If WAS and IIS are already installed on this computer,
@echo this process simply ensures that all necessary components are installed. @echo. @echo. @echo Installing Windows Process Activation Services - Please Wait start /w %WINDIR%\sysnative\pkgmgr /l:%TEMP%\InstallWAS.log /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;

if NOT ERRORLEVEL 0 ( @echo.
@echo An error occurred while installing Windows Process Activation Services - ERRORLEVEL% @echo Please refer to the log file %TEMP%\InstallWAS.log
@echo for more information. @echo. pause EXIT )

@echo. @echo Installing Microsoft Internet Information Services - Please wait... start /w %WINDIR%\sysnative\pkgmgr /l:%TEMP%\InstallIIS.log /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI; if NOT ERRORLEVEL 0 ( @echo.
@echo An error occurred while installing Microsoft Internet Information Services - %ERRORLEVEL% @echo Please refer to the log file %TEMP%\InstallIIS.log
@echo for more information. @echo. pause EXIT )

@echo.
@echo Installation was successful! @echo. EXIT

Thank you, ACordner, wherever you are now :-)