cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DataAnalyzer
Level 8

Changing Prerequisite to install AFTER the Setup user input is completed

I added a Prerequisite to install the .NET Framework 3.5 and was surprised it started to install as soon as the setup program was run on a Windows 10 machine. I don't expect anything to be installed until the user goes through the setup pages. After all, if they cancel, this would have been installed.

Is there a way to change when that happens to the end? Hopefully it's some simple property setting I'm missing. Thanks.
Labels (1)
0 Kudos
(7) Replies
PlinyElder
Level 7

Is this a basic MSI project? All projects, EXCEPT Suite/Advanced UI, run any prerequisites BEFORE the user is able to provide input to the UI. When you create a Suite/Advanced project you can make prereq's part of the installation process itself and push those out to actual features/components. This will allow you to run these installs at a later point in the installation if you wish.
0 Kudos
DataAnalyzer
Level 8

I have an InstallScript Project, not a Basic MSI project. Does that give me this option?

If not, can I programmatically run the equivalent of the NET Framework pre-requisite instead? If so, how?

Thanks.
0 Kudos
PlinyElder
Level 7

I dont believe any of the projects except the Suite allow this. I dont think you can move the prereq sequences around, but i suppose you could dump the prereq exe into the users system then use installscript to execute that exe. That may work
0 Kudos
BobHickey
Level 4

I hope someone has a solution to this. The inability to show the setup screens first has kept me from being able to implement the prerequisites into our installer.
0 Kudos
DLee65
Level 13

If this is a pure InstallScript project then I would download the Microsoft redistributable for .NET framework. Instead of adding it as a prerequisite, add it to your support files, and then in the BeforeOnMove event code what you need to launch the app and wait for it to return.

Since this is Dot Net 3.5 we are talking about, then you may need to integrate a command line to call DISM to enable the feature on Windows 8, 8.1, and 10. Microsoft does not offer a redistributable for these platforms.
0 Kudos
DataAnalyzer
Level 8

Thank you for your response. I'm actually only interested in turning it on for post Windows 7 machines.

However, in my tests on those O/S, just turning it on (interactively outside of a setup program) can trigger a long download process.

Regardless, how can I detect the situation and try to turn that on at the end of the Wizard if it's not on? Is it simply running the Helper.EXE file in the DISM folder?
0 Kudos
PlinyElder
Level 7

I use installscript to build the array of features/roles i need installed. I then pass that array to a powershell script that first checks if the feature/role is already installed, if not then enable it.

Powershell script:
[CODE]
param([string]$role)

Import-Module Servermanager

if( $role -ne "" ) {
$check = Get-WindowsFeature -name $role
Write-Host "Role/Feature State is: "$check.Installed

if( $check.Installed -like "False" ) {
Add-WindowsFeature -name $role

do{
$check2 = Get-WindowsFeature -name $role
Write-Host "Installing $role."
Start-Sleep -s 1
}
while( $check2.Installed -like "False" )
}
}
[/CODE]

Call the ps1 script from Installshield

LaunchApplication( WindowsFolder ^ "sysnative\\WindowsPowerShell\\v1.0\\Powershell.exe", "-ExecutionPolicy Bypass -File " + svSupportFile ^ "EnableRoleFeature.ps1" + " -role " + svFeatureArray(nCount), "", SW_HIDE, INFINITE, LAAW_OPTION_WAIT );


Now this powershell script only works on servers, because the Import-Module Servermanager doesn't exist on non server machines. You can do very similar things with the DISM tool tho, only its not as smart as powershell and slower.
0 Kudos