You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script performs the installation or uninstallation of an application(s).
4
+
# LICENSE #
5
+
PowerShell App Deployment Toolkit - Provides a set of functions to perform common application deployment tasks on Windows.
6
+
Copyright (C) 2017 - Sean Lillis, Dan Cunningham, Muhammad Mashwani, Aman Motazedian.
7
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
+
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
9
+
.DESCRIPTION
10
+
The script is provided as a template to perform an install or uninstall of an application(s).
11
+
The script either performs an "Install" deployment type or an "Uninstall" deployment type.
12
+
The install deployment type is broken down into 3 main sections/phases: Pre-Install, Install, and Post-Install.
13
+
The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application.
14
+
.PARAMETERDeploymentType
15
+
The type of deployment to perform. Default is: Install.
16
+
.PARAMETERDeployMode
17
+
Specifies whether the installation should be run in Interactive, Silent, or NonInteractive mode. Default is: Interactive. Options: Interactive = Shows dialogs, Silent = No dialogs, NonInteractive = Very silent, i.e. no blocking apps. NonInteractive mode is automatically set if it is detected that the process is not user interactive.
18
+
.PARAMETERAllowRebootPassThru
19
+
Allows the 3010 return code (requires restart) to be passed back to the parent process (e.g. SCCM) if detected from an installation. If 3010 is passed back to SCCM, a reboot prompt will be triggered.
20
+
.PARAMETERTerminalServerMode
21
+
Changes to "user install mode" and back to "user execute mode" for installing/uninstalling applications for Remote Destkop Session Hosts/Citrix servers.
22
+
.PARAMETERDisableLogging
23
+
Disables logging to file for the script. Default is: $false.
If (-not (Test-Path-LiteralPath $moduleAppDeployToolkitMain-PathType 'Leaf')) { Throw"Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
101
+
If ($DisableLogging) { .$moduleAppDeployToolkitMain-DisableLogging } Else { .$moduleAppDeployToolkitMain }
102
+
}
103
+
Catch {
104
+
If ($mainExitCode-eq0){ [int32]$mainExitCode=60008 }
105
+
Write-Error-Message "Module [$moduleAppDeployToolkitMain] failed to load: `n$($_.Exception.Message)`n`n$($_.InvocationInfo.PositionMessage)"-ErrorAction 'Continue'
106
+
## Exit the script, returning the exit code to SCCM
## 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
#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 }
0 commit comments