Skip to content

Instantly share code, notes, and snippets.

@adamdriscoll
Created August 18, 2018 20:38
Show Gist options
  • Save adamdriscoll/6a3b2aacbfddfee9c2a7657f45ea6026 to your computer and use it in GitHub Desktop.
Save adamdriscoll/6a3b2aacbfddfee9c2a7657f45ea6026 to your computer and use it in GitHub Desktop.
Runs a custom action on install
New-Installer -ProductName "Notepad" -UpgradeCode c5b5bcbb-a94f-4490-9746-7563a454357f -OutputDirectory $PSScriptRoot -Content {
New-InstallerDirectory -PredefinedDirectoryName AppDataFolder -Content {
New-InstallerDirectory -DirectoryName "Notepad" -Content {
New-InstallerFile -Source (Join-Path $PSScriptRoot "notepad.ps1") -Id "Notepadps1"
}
}
} -CustomAction @(
New-InstallerCustomAction -FileId "Notepadps1" -RunOnInstall -CheckReturnValue
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment