Skip to content

Commit

Permalink
Software Add: Add MTPuTTY
Browse files Browse the repository at this point in the history
  • Loading branch information
MWGMorningwood committed Sep 5, 2024
1 parent ecefe33 commit 82a0cc4
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions Software/MTPuTTY/MTPuTTY Dynamic Versions Script.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get-DynamicVersionFromInstallerURL "https://ttyplus.com/download/mtputty_setup.exe"
32 changes: 32 additions & 0 deletions Software/MTPuTTY/MTPuTTy Installation Script.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<#

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
Modified from the Immy Default Inno Setup Install Script
Needed to add /ALLUSERS
#>

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace

$Arguments = @"
/SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS /LOG="$InstallerLogFile"
"@
Start-ProcessWithLogTail $InstallerFile -ArgumentList $Arguments -LogFilePath $InstallerLogFile -RegexActions @{
'\d\s+Filename: (.*.exe)' = {
try {
$FileNameWithExtension = Split-Path -Leaf $matches[1]
$FileName = [IO.Path]::GetFileNameWithoutExtension($FileNameWithExtension)
} catch {
$FileName = $null
}
if ($FileName) {
Write-Host "Checking if $FileName is running"

Check warning

Code scanning / PSScriptAnalyzer

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
$process = Get-Process -Name $FileName -ErrorAction SilentlyContinue
if ($process) {
Write-Host "Killing $FileNameWithExtension"

Check warning

Code scanning / PSScriptAnalyzer

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
taskkill /im $FileNameWithExtension /f 2>&1 | Out-Null
Write-Host "Done"

Check warning

Code scanning / PSScriptAnalyzer

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
} else {
Write-Host "$FileNameWithExtension is not running"

Check warning

Code scanning / PSScriptAnalyzer

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning

File 'MTPuTTy Installation Script.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.
}
}
}
'\d\s+Log closed'={
# taskkill /im TrayTipAgentE.exe /f 2>&1 | Out-Null
}
}
28 changes: 28 additions & 0 deletions Software/MTPuTTY/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Summary
MTPuTTY (Multi-Tabbed PuTTY) is a small *FREE* utility enabling you to wrap unlimited number of PuTTY applications in one tabbed GUI interface.
You are still continue using your favorite SSH client, but you are no longer messing around with PuTTY windows - each window will be opened in a separate tab.
[Read More](https://ttyplus.com/multi-tabbed-putty/)

> [!WARNING]
> The scripts involved rely on immy.bot metascript functions that are only available in immy.bot.
> This repository is for immy-specific PowerShell, and a generic version may be added elsewhere.
# Deployment Settings
## Software Info
* **Name**: `MTPuTTY`
* **Icon**: [MTPuTTY Icon](https://community.chocolatey.org/content/packageimages/mtputty.1.6.1.176.png)
## Version Detection
* **Detection Method**: `Display Name`
* **Display Name Contains**: `MTPuTTY`
## Scripts
* **Installation**: `#TBD - MTPuTTY Installation Script - (Local)`
* Select `+ New` and paste the [MTPuTTY Installation Script](./MTPuTTy%20Installation%20Script.ps1)
* **Script Execution Context**: `Metascript`
* **Uninstallation**: `#1331 - Uninstall Software by Name - (Global)`
* Select the dropdown and search for `Uninstall Software by Name` in the global repository.
* **Upgrade Strategy**: `Install Over` (tested)
* **Configuration Task**: N/A
## Advanced Settings
* **Dynamic Versions**: `#TBD - MTPuTTY Dynamic Versions Script - (Local)`
* Select the checkbox for `Use dynamic versions`
* Select `+ New` and paste the [MTPuTTY Dynamic Versions Script](./MTPuTTy%20Dynamic%20Versions%20Script.ps1)

0 comments on commit 82a0cc4

Please sign in to comment.