-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4012898
Showing
19 changed files
with
14,243 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<# | ||
.SYNOPSIS | ||
This script is a template that allows you to extend the toolkit with your own custom functions. | ||
# LICENSE # | ||
PowerShell App Deployment Toolkit - Provides a set of functions to perform common application deployment tasks on Windows. | ||
Copyright (C) 2017 - Sean Lillis, Dan Cunningham, Muhammad Mashwani, Aman Motazedian. | ||
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. | ||
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/>. | ||
.DESCRIPTION | ||
The script is automatically dot-sourced by the AppDeployToolkitMain.ps1 script. | ||
.NOTES | ||
Toolkit Exit Code Ranges: | ||
60000 - 68999: Reserved for built-in exit codes in Deploy-Application.ps1, Deploy-Application.exe, and AppDeployToolkitMain.ps1 | ||
69000 - 69999: Recommended for user customized exit codes in Deploy-Application.ps1 | ||
70000 - 79999: Recommended for user customized exit codes in AppDeployToolkitExtensions.ps1 | ||
.LINK | ||
http://psappdeploytoolkit.com | ||
#> | ||
[CmdletBinding()] | ||
Param ( | ||
) | ||
|
||
##*=============================================== | ||
##* VARIABLE DECLARATION | ||
##*=============================================== | ||
|
||
# Variables: Script | ||
[string]$appDeployToolkitExtName = 'PSAppDeployToolkitExt' | ||
[string]$appDeployExtScriptFriendlyName = 'App Deploy Toolkit Extensions' | ||
[version]$appDeployExtScriptVersion = [version]'3.8.2' | ||
[string]$appDeployExtScriptDate = '08/05/2020' | ||
[hashtable]$appDeployExtScriptParameters = $PSBoundParameters | ||
|
||
##*=============================================== | ||
##* FUNCTION LISTINGS | ||
##*=============================================== | ||
|
||
# <Your custom functions go here> | ||
|
||
##*=============================================== | ||
##* END FUNCTION LISTINGS | ||
##*=============================================== | ||
|
||
##*=============================================== | ||
##* SCRIPT BODY | ||
##*=============================================== | ||
|
||
If ($scriptParentPath) { | ||
Write-Log -Message "Script [$($MyInvocation.MyCommand.Definition)] dot-source invoked by [$(((Get-Variable -Name MyInvocation).Value).ScriptName)]" -Source $appDeployToolkitExtName | ||
} Else { | ||
Write-Log -Message "Script [$($MyInvocation.MyCommand.Definition)] invoked directly" -Source $appDeployToolkitExtName | ||
} | ||
|
||
##*=============================================== | ||
##* END SCRIPT BODY | ||
##*=============================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<# | ||
.SYNOPSIS | ||
Displays a graphical console to browse the help for the App Deployment Toolkit functions | ||
# LICENSE # | ||
PowerShell App Deployment Toolkit - Provides a set of functions to perform common application deployment tasks on Windows. | ||
Copyright (C) 2017 - Sean Lillis, Dan Cunningham, Muhammad Mashwani, Aman Motazedian. | ||
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. | ||
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/>. | ||
.DESCRIPTION | ||
Displays a graphical console to browse the help for the App Deployment Toolkit functions | ||
.EXAMPLE | ||
AppDeployToolkitHelp.ps1 | ||
.NOTES | ||
.LINK | ||
http://psappdeploytoolkit.com | ||
#> | ||
|
||
##*=============================================== | ||
##* VARIABLE DECLARATION | ||
##*=============================================== | ||
|
||
## Variables: Script | ||
[string]$appDeployToolkitHelpName = 'PSAppDeployToolkitHelp' | ||
[string]$appDeployHelpScriptFriendlyName = 'App Deploy Toolkit Help' | ||
[version]$appDeployHelpScriptVersion = [version]'3.8.2' | ||
[string]$appDeployHelpScriptDate = '08/05/2020' | ||
|
||
## Variables: Environment | ||
[string]$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent | ||
# Dot source the App Deploy Toolkit Functions | ||
. "$scriptDirectory\AppDeployToolkitMain.ps1" -DisableLogging | ||
. "$scriptDirectory\AppDeployToolkitExtensions.ps1" | ||
##*=============================================== | ||
##* END VARIABLE DECLARATION | ||
##*=============================================== | ||
|
||
##*=============================================== | ||
##* FUNCTION LISTINGS | ||
##*=============================================== | ||
|
||
Function Show-HelpConsole { | ||
## Import the Assemblies | ||
Add-Type -AssemblyName 'System.Windows.Forms' -ErrorAction 'Stop' | ||
Add-Type -AssemblyName System.Drawing -ErrorAction 'Stop' | ||
|
||
## Form Objects | ||
$HelpForm = New-Object -TypeName 'System.Windows.Forms.Form' | ||
$HelpListBox = New-Object -TypeName 'System.Windows.Forms.ListBox' | ||
$HelpTextBox = New-Object -TypeName 'System.Windows.Forms.RichTextBox' | ||
$InitialFormWindowState = New-Object -TypeName 'System.Windows.Forms.FormWindowState' | ||
|
||
## Form Code | ||
$System_Drawing_Size = New-Object -TypeName 'System.Drawing.Size' | ||
$System_Drawing_Size.Height = 665 | ||
$System_Drawing_Size.Width = 957 | ||
$HelpForm.ClientSize = $System_Drawing_Size | ||
$HelpForm.DataBindings.DefaultDataSourceUpdateMode = 0 | ||
$HelpForm.Name = 'HelpForm' | ||
$HelpForm.Text = 'PowerShell App Deployment Toolkit Help Console' | ||
$HelpForm.WindowState = 'Normal' | ||
$HelpForm.ShowInTaskbar = $true | ||
$HelpForm.FormBorderStyle = 'Fixed3D' | ||
$HelpForm.MaximizeBox = $false | ||
$HelpForm.Icon = New-Object -TypeName 'System.Drawing.Icon' -ArgumentList $AppDeployLogoIcon | ||
$HelpListBox.Anchor = 7 | ||
$HelpListBox.BorderStyle = 1 | ||
$HelpListBox.DataBindings.DefaultDataSourceUpdateMode = 0 | ||
$HelpListBox.Font = New-Object -TypeName 'System.Drawing.Font' -ArgumentList ('Microsoft Sans Serif', 9.75, 1, 3, 1) | ||
$HelpListBox.FormattingEnabled = $true | ||
$HelpListBox.ItemHeight = 16 | ||
$System_Drawing_Point = New-Object -TypeName 'System.Drawing.Point' | ||
$System_Drawing_Point.X = 0 | ||
$System_Drawing_Point.Y = 0 | ||
$HelpListBox.Location = $System_Drawing_Point | ||
$HelpListBox.Name = 'HelpListBox' | ||
$System_Drawing_Size = New-Object -TypeName 'System.Drawing.Size' | ||
$System_Drawing_Size.Height = 658 | ||
$System_Drawing_Size.Width = 271 | ||
$HelpListBox.Size = $System_Drawing_Size | ||
$HelpListBox.Sorted = $true | ||
$HelpListBox.TabIndex = 2 | ||
$HelpListBox.add_SelectedIndexChanged({ $HelpTextBox.Text = Get-Help -Name $HelpListBox.SelectedItem -Full | Out-String }) | ||
$helpFunctions = Get-Command -CommandType 'Function' | Where-Object { ($_.HelpUri -match 'psappdeploytoolkit') -and ($_.Definition -notmatch 'internal script function') } | Select-Object -ExpandProperty Name | ||
$null = $HelpListBox.Items.AddRange($helpFunctions) | ||
$HelpForm.Controls.Add($HelpListBox) | ||
$HelpTextBox.Anchor = 11 | ||
$HelpTextBox.BorderStyle = 1 | ||
$HelpTextBox.DataBindings.DefaultDataSourceUpdateMode = 0 | ||
$HelpTextBox.Font = New-Object -TypeName 'System.Drawing.Font' -ArgumentList ('Microsoft Sans Serif', 8.5, 0, 3, 1) | ||
$HelpTextBox.ForeColor = [System.Drawing.Color]::FromArgb(255, 0, 0, 0) | ||
$System_Drawing_Point = New-Object -TypeName System.Drawing.Point | ||
$System_Drawing_Point.X = 277 | ||
$System_Drawing_Point.Y = 0 | ||
$HelpTextBox.Location = $System_Drawing_Point | ||
$HelpTextBox.Name = 'HelpTextBox' | ||
$HelpTextBox.ReadOnly = $True | ||
$System_Drawing_Size = New-Object -TypeName 'System.Drawing.Size' | ||
$System_Drawing_Size.Height = 658 | ||
$System_Drawing_Size.Width = 680 | ||
$HelpTextBox.Size = $System_Drawing_Size | ||
$HelpTextBox.TabIndex = 1 | ||
$HelpTextBox.Text = '' | ||
$HelpForm.Controls.Add($HelpTextBox) | ||
|
||
## Save the initial state of the form | ||
$InitialFormWindowState = $HelpForm.WindowState | ||
## Init the OnLoad event to correct the initial state of the form | ||
$HelpForm.add_Load($OnLoadForm_StateCorrection) | ||
## Show the Form | ||
$null = $HelpForm.ShowDialog() | ||
} | ||
|
||
##*=============================================== | ||
##* END FUNCTION LISTINGS | ||
##*=============================================== | ||
|
||
##*=============================================== | ||
##* SCRIPT BODY | ||
##*=============================================== | ||
|
||
Write-Log -Message "Load [$appDeployHelpScriptFriendlyName] console..." -Source $appDeployToolkitHelpName | ||
|
||
## Show the help console | ||
Show-HelpConsole | ||
|
||
Write-Log -Message "[$appDeployHelpScriptFriendlyName] console closed." -Source $appDeployToolkitHelpName | ||
|
||
##*=============================================== | ||
##* END SCRIPT BODY | ||
##*=============================================== |
Binary file not shown.
Oops, something went wrong.