Add a script for installing WinSCP
This commit is contained in:
parent
fc4215b341
commit
a11646372a
|
@ -172,13 +172,21 @@ $null = New-Module {
|
|||
}
|
||||
};
|
||||
|
||||
# Windows Config
|
||||
. "$PSScriptRoot/../Software/Windows/Manage.ps1" @arguments;
|
||||
$null = New-Module {
|
||||
# Windows Config
|
||||
$softwarePath = "$PSScriptRoot/../Software";
|
||||
. "$softwarePath/Windows/Manage.ps1" @arguments;
|
||||
|
||||
if (Test-Collection "essential") {
|
||||
# Essentials
|
||||
. "$PSScriptRoot/../Software/OpenSSH/Manage.ps1" @arguments;
|
||||
}
|
||||
if (Test-Collection "essential") {
|
||||
# Essentials
|
||||
. "$softwarePath/OpenSSH/Manage.ps1" @arguments;
|
||||
}
|
||||
|
||||
if (Test-Collection "common") {
|
||||
# Common Software
|
||||
. "$softwarePath/WinSCP/Manage.ps1" @arguments;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
switch (Get-Stage) {
|
||||
|
|
25
scripts/Windows/Software/WinSCP/Manage.ps1
Normal file
25
scripts/Windows/Software/WinSCP/Manage.ps1
Normal file
|
@ -0,0 +1,25 @@
|
|||
using namespace Microsoft.Win32;
|
||||
|
||||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../Scripts/AppAssociations.ps1";
|
||||
. "$PSScriptRoot/../../Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../Scripts/System.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
param(
|
||||
[scriptblock] $Installer
|
||||
)
|
||||
|
||||
Install-ChocoPackage winscp;
|
||||
& $Installer -Action ([InstallerAction]::Configure)
|
||||
} `
|
||||
-Configurator {
|
||||
Remove-DesktopIcon "WinSCP*";
|
||||
Write-Host "Making WinSCP the default FTP program…";
|
||||
Set-DefaultAppAssociation -Identifier "ftp" -ProgId "WinSCP.Url" -ApplicationName "WinSCP: SFTP, FTP, WebDAV, S3 and SCP client";
|
||||
};
|
Loading…
Reference in a new issue