Multiple installs in once script

What is the best way to run multiple installs in one script? I have tried adding an installation section for each application, but when I try to run it, nothing happens.

Hello Michael,
Can you please provide some log files from when you test, and the code you are using.

Log files are being generated. Here is the code:

<#
.SYNOPSIS
This script performs the installation or uninstallation of an application(s).

#>
[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet(‘Install’,‘Uninstall’)]
[string]$DeploymentType = ‘Install’,
[Parameter(Mandatory=$false)]
[ValidateSet(‘Interactive’,‘Silent’,‘NonInteractive’)]
[string]$DeployMode = ‘Interactive’,
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru = $false,
[Parameter(Mandatory=$false)]
[switch]$TerminalServerMode = $false,
[Parameter(Mandatory=$false)]
[switch]$DisableLogging = $false
)

Install Lansweeper

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Lansweeper'
[string]$appName = 'Lansweeper Client'
[string]$appVersion = '4.1.0.3'
[string]$appArch = 'x86'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	

	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	##If ($useDefaultMsi) {
	##	[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
	##	Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	##}
	
	## &lt;Perform Installation tasks here&gt;
    Show-InstallationProgress "Installing Lansweeper"
	New-Folder -Path 'C:\lsclient'
    Copy-File -Path '\\*server*\dist\software\LSclient\LSclient.exe' -Destination 'C:\lsclient'
    Execute-Process -Path 'C:\lsclient\lsclient.exe' -Parameters '*server*.*domain*.org'

	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	#[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	#If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }

}

Install Bit9

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = '*app*'
[string]$appName = '*app*'
[string]$appVersion = '7.0.1.1892'
[string]$appArch = 'x86'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	##If ($useDefaultMsi) {
	##	[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
	##	Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	##}
	
	## &lt;Perform Installation tasks here&gt;
	Show-InstallationProgress "Installing Bit9"
    Execute-MSI -Action Install -Path '\\*server*\hostpkg\MH Lockdown.msi'

	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
}

Install SSO

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Imprivata'
[string]$appName = 'Imprivata Agent'
[string]$appVersion = '5.0.104.41'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	

	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress "Installing SSO"
	
	## &lt;Perform Pre-Installation tasks here&gt;
	
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;
	Execute-MSI -Action Install -Path '\\*server*\dist\software\onesign\OneSignAgentx64.msi' -Parameter 'IPTXPRIMSERVER="https://*server*.*domain*.org/sso/servlet/messagerouter" AGENTTYPE="2" /QB /NORESTART'
    Set-RegistryKey -Key 'HKLM\SOFTWARE\Wow6432Node\SSOProvider\CoBranding /v LogoImage /d "\\*server*\dist\applications\icons\SSO-Logo.bmp" /f'
    Set-RegistryKey -Key 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v DisableCAD /t reg_dword /d "1" /f'
	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
}

Install SCCM

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Microsoft'
[string]$appName = 'SCCM 2012 SP1 Client'
[string]$appVersion = '2012 SP1'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	

	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress "Installing SCCM"
	
	## &lt;Perform Pre-Installation tasks here&gt;
	
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;
	Execute-Process -Path '\\*server*\dist\software\Microsoft\SCCM 2012\Client\ccmsetup.exe' -Parameter '/source:"\\*server*\dist\software\microsoft\sccm 2012\client" /mp:*site* SMSSITECODE=MH1 SMSSLP=*server*.*domain*.ORG SMSMP=*server*.*domain*.ORG DISABLESITEOPT=TRUE DNSSUFFIX=*domain*.ORG'
    
	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
}

Install Updates

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Microsoft'
[string]$appName = 'SCCM Updates'
[string]$appVersion = ''
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	

	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress
	
	## &lt;Perform Pre-Installation tasks here&gt;
	Show-InstallationPrompt -Message 'Is this a laptop?' -ButtonRightText 'Yes' -ButtonLeftText 'No' |'Yes' 
    
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;
	Invoke-SCCMTask 'SoftwareUpdatesScan'
    
	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
}

Install PGP

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Symantec'
[string]$appName = 'Encryption Desktop'
[string]$appVersion = '10.3.2'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '09/18/2015'
[string]$appScriptAuthor = 'Michael DeCesere'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	

	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress
	
	## &lt;Perform Pre-Installation tasks here&gt;
	$userResponse = Show-DialogBox -Title 'Installation Notice' -Text 'Is this a laptop?' -Buttons 'yesNo' -Icon "Question"
    If ($userResponse -eq 'No') Exit-Script
    
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;
	Execute-MSI -Action Install -Path '\\*server*\dist\software\Symantec Encryption Desktop\PGPDesktop64_en-US.msi'
    
	
	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }



##*===============================================
##* END SCRIPT BODY
##*===============================================

## Call the Exit-Script function to perform final cleanup operations
Exit-Script -ExitCode $mainExitCode

}
Catch {
[int32]$mainExitCode = 60001
[string]$mainErrorMessage = “$(Resolve-Error)”
Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
Show-DialogBox -Text $mainErrorMessage -Icon ‘Stop’
Exit-Script -ExitCode $mainExitCode
}

Any help would be greatly appreciated!

That should have said ‘NO log files are being generated’

Not to be rude, but if you don’t know what you’re doing wrong here, then I would suggest taking some basic courses on PowerShell. You can’t just take the entire script and copy/paste it multiple times for each install you need to do. Either create multiple script files or execute each MSI/EXE in one script one after the other.

I don’t know a lot about PowerShell, which is why I chose this toolkit. If you can’t/don’t want to help, then don’t comment.

Michael,

The way the script is you don’t need to redo the entire script for each individual install. I’ll show you what I did to patch Third-Party applications all in one go. It’s not pretty but it facilitated what I needed in the short run: Patch Clients. I only included my Pre & Install steps. (I use Notepad++ to edit scripts and create them. Just change your language to PowerShell.


	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore,AcroRd32,chrome,firefox' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt -BlockExecution -CloseAppsCountdown 180
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress
	
	## &lt;Perform Pre-Installation tasks here&gt;
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 1 of 8' -BalloonTipTitle 'Adobe AIR' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Adobe AIR'
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 2 of 8' -BalloonTipTitle 'Adobe Acrobat Reader' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Adobe Reader'
	Remove-MSIApplications -Name 'Adobe Acrobat Reader'
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 3 of 7' -BalloonTipTitle 'Adobe Flash Player Plugin' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Flash Player 18 NPAPI'
	Remove-MSIApplications -Name 'Flash Player 17 NPAPI'
	Remove-MSIApplications -Name 'Flash Player 16 NPAPI'
	Remove-MSIApplications -Name 'Flash Player 15 NPAPI'
	Remove-MSIApplications -Name 'Flash Player 18 Plugin'
	Remove-MSIApplications -Name 'Flash Player 17 Plugin'
	Remove-MSIApplications -Name 'Flash Player 16 Plugin'
	Remove-MSIApplications -Name 'Flash Player 15 Plugin'
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 4 of 7' -BalloonTipTitle 'Adobe Shockwave Player' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Shockwave Player'
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 5 of 7' -BalloonTipTitle 'Java 7' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Java 7'
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 6 of 7' -BalloonTipTitle 'Java 8' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Java 8'
	Copy-File -Path "$DirFiles\JRE 8\jre-8u60.cfg" -Destination "c:\programdata\jre-8u60.cfg"
	
	Show-BalloonTip -BalloonTipText 'Uninstall started: 7 of 7' -BalloonTipTitle 'Chrome' -BalloonTipTime 1000
	Remove-MSIApplications -Name 'Google Chrome'
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;

	Show-BalloonTip -BalloonTipText 'Installation started: 1 of 12' -BalloonTipTitle 'Google Chrome 66.101.32853' -BalloonTipTime 2000
	Execute-MSI -Path "$dirFiles\Chrome\googlechromestandaloneenterprise.msi"
	Write-Log -Message "Installing Google Chrome 66.101.32853" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 2 of 12' -BalloonTipTitle 'Mozilla Firefox 40.0.3' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\Firefox\Firefox Setup 40.0.3.exe" -Parameters '-ms'
	Remove-File -Path 'C:\Users\Public\Desktop\Mozilla Firefox.lnk'
	Write-Log -Message "Installing Mozilla Firefox 40.0.3" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 3 of 12' -BalloonTipTitle 'Adobe AIR 18.0.0.199' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\AIR\Adobe AIR Installer.exe" -Parameters '-silent -eulaAccepted'
	Write-Log -Message "Installing Adobe AIR 18.0.0.199" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 4 of 12' -BalloonTipTitle 'Adobe Reader 11.0.0' -BalloonTipTime 2000
	Execute-MSI -Action Install -Path "$dirFiles\Reader\AcroRead.msi" -Transform 'AcroRead.mst'
    Write-Log -Message "Installing Adobe Reader 11.0.0" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 5 of 12' -BalloonTipTitle 'Adobe Reader Update 11.0.10' -BalloonTipTime 2000
	Execute-MSI -Action Patch -Path "$dirFiles\Reader\AdbeRdrUpd11010.msp"
	Write-Log -Message "Installing Adobe Reader Update 11.0.10" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 6 of 12' -BalloonTipTitle 'Adobe Extended Asian Language Pack 11.0.09' -BalloonTipTime 2000
	Execute-MSI -Action Patch -Path "$dirFiles\Reader\FontPack11009_XtdAlf_Lang.msi"
	Write-Log -Message "Installing Adobe Extended Asian Language Pack 11.0.09" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 7 of 12' -BalloonTipTitle 'Adobe Flash Player 18 Plugin 18.0.0.232' -BalloonTipTime 2000
	Execute-MSI -Action Install -Path "$dirFiles\Flash Player Plugin\install_flash_player_18_plugin.msi" -Parameters '/passive /norestart'
	Write-Log -Message "Installing Adobe Flash Player 18 Plugin 18.0.0.232" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 8 of 12' -BalloonTipTitle 'Adobe Shockwave Player 12.2.0.162' -BalloonTipTime 2000
	Execute-MSI -Action Install -Path "$dirFiles\Shockwave Player\sw_lic_full_installer.msi" -Parameters '/qb'
	Write-Log -Message "Installing Adobe Shockwave Player 12.2.0.162" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 9 of 12' -BalloonTipTitle 'Java 7 Update 80 x86' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\JRE 7\jre-7u80-windows-i586.exe" -Parameters '/s /v"AgreeToLicense=YES IEXPLORER=1 MOZILLA=1 REBOOT=SUPRESS JAVAUPDATE=0 SYSTRAY=0"'
	Write-Log -Message "Installing Java 7 Update 80 x86" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 10 of 12' -BalloonTipTitle 'Java 7 Update 80 x64' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\JRE 7\jre-7u80-windows-x64.exe" -Parameters '/s /v"AgreeToLicense=YES IEXPLORER=1 MOZILLA=1 REBOOT=SUPRESS JAVAUPDATE=0 SYSTRAY=0"'
	Write-Log -Message "Installing Java 7 Update 80 x64" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 11 of 12' -BalloonTipTitle 'Java 8 Update 60 x86' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\JRE 8\jre-8u60-windows-i586.exe" -Parameters 'INSTALLCFG=c:\ProgramData\jre-8u60.cfg'
	Write-Log -Message "Installing Java 8 Update 60 x86" -Source 'Add-Patch' -LogType 'CMTrace'
	
	Show-BalloonTip -BalloonTipText 'Installation started: 12 of 12' -BalloonTipTitle 'Java 8 Update 60 x64' -BalloonTipTime 2000
	Execute-Process -Path "$dirFiles\JRE 8\jre-8u60-windows-x64.exe" -Parameters 'INSTALLCFG=c:\ProgramData\jre-8u60.cfg'
	Write-Log -Message "Installing Java 8 Update 60 x64" -Source 'Add-Patch' -LogType 'CMTrace'

(sorry posted this in the wrong section, deleting.)