What about non-MSI installers?

Topics: Archive - Deployment Scripts
Mar 6, 2014 at 5:39 PM
Edited Mar 6, 2014 at 7:49 PM
Hello Everyone,

Thanks for doing this awesome work and putting the script together. I works great but for MSI installers only, as far as I can tell.

Would it be possible to extend its functionality by adding a function to install and kind of ".exe" file that has a silent install switch?

For example, NotepadPlusPlus is not an MSI but an exe file. How would you use the toolkit without repackaging NotepadPlusPlus into an MSI?

I`m a beginner in PowerShell and so far I use a VBScript wrapper to perform any kind of installation but I would like to be able to do the same thing in PowerShell.

Thanks so much,


Never mind, I studied the examples provided here and I was able to customize the script to install Notepad++.

Here is the code:
    This script performs the installation or uninstallation of an application(s).  
    The script is provided as a template to perform an install or uninstall of an application(s). 
    The script either performs an "Install" deployment type or an "Uninstall" deployment type.
    The install deployment type is broken down in to 3 main sections/phases: Pre-Install, Install, and Post-Install.
    The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application.
    To access the help section,
    Deploy-Application.ps1 -DeploymentType "Silent"
    Deploy-Application.ps1 -AllowSCCMReboot -AllowDefer
    Deploy-Application.ps1 -Uninstall 
.PARAMETER DeploymentType
    The type of deployment to perform. [Default is "Install"]
    Specifies whether the installation should be run in Interactive, Silent or NonInteractive mode.
    Interactive = Default mode
    Silent = No dialogs
    NonInteractive = Very silent, i.e. no blocking apps. Noninteractive mode is automatically set if an SCCM task sequence or session 0 is detected.
.PARAMETER AllowRebootPassThru
    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.
Param (
    [string]$DeploymentType = "Install",     
    [string]$DeployMode = "Silent",
    [switch]$AllowRebootPassThru = $false

Try {

# Variables: Application

$appVendor = "notepad-plus-plus.org"
$appName = "Notepad++"
$appVersion = "6.5.4"
$appArch = ""
$appLang = "EN"
$appRevision = "01"
$appScriptVersion = "1.0.0"
$appScriptDate = "03/06/2014"
$appScriptAuthor = "Nelu Goia"

# Variables: Script - Do not modify this section

$deployAppScriptFriendlyName = "Deploy Application"
$deployAppScriptVersion = "3.0.0"
$deployAppScriptDate = "08/21/2013"
$deployAppScriptParameters = $psBoundParameters

# Variables: Environment
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition
# Dot source the App Deploy Toolkit Functions


If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"

$installPhase = "Installation"

    # Perform installation tasks here
    Execute-Process -FilePath "npp.6.5.4.Installer.exe" -Arguments "/S"

$installPhase = "Post-Installation"



} } Catch {$exceptionMessage = "$($_.Exception.Message) `($($_.ScriptStackTrace)`)"; Write-Log "$exceptionMessage"; Show-DialogBox -Text $exceptionMessage -Icon "Stop"; Exit-Script -ExitCode 1} # Catch any errors in this script 
Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations