Configure software implicitly
This commit is contained in:
parent
eda3c967ae
commit
ce0473d106
|
@ -241,17 +241,18 @@ $null = New-Module {
|
||||||
Write-Host "Installing $Name…";
|
Write-Host "Installing $Name…";
|
||||||
& $Installer @argumentList;
|
& $Installer @argumentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& $installHandler @argumentList -Action ([InstallerAction]::Configure);
|
||||||
|
|
||||||
|
if (-not (Test-SetupUser)) {
|
||||||
|
& $installHandler @argumentList -Action ([InstallerAction]::ConfigureUser);
|
||||||
|
}
|
||||||
# ToDo: Automatically configure after installation
|
# ToDo: Automatically configure after installation
|
||||||
} elseif ($Action -eq ([InstallerAction]::Configure)) {
|
} elseif ($Action -eq ([InstallerAction]::Configure)) {
|
||||||
if ($Configurator) {
|
if ($Configurator) {
|
||||||
Write-Host "Configuring $Name…";
|
Write-Host "Configuring $Name…";
|
||||||
& $Configurator @argumentList;
|
& $Configurator @argumentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not (Test-SetupUser)) {
|
|
||||||
$argumentList.Add("action", [InstallerAction]::ConfigureUser);
|
|
||||||
& $installHandler @argumentList;
|
|
||||||
}
|
|
||||||
} elseif ($Action -eq ([InstallerAction]::ConfigureUser)) {
|
} elseif ($Action -eq ([InstallerAction]::ConfigureUser)) {
|
||||||
if ((-not $Arguments.ContainsKey($userArgument)) -or (-not $Arguments[$userArgument])) {
|
if ((-not $Arguments.ContainsKey($userArgument)) -or (-not $Arguments[$userArgument])) {
|
||||||
$Arguments.Add($userArgument, ($env:UserName));
|
$Arguments.Add($userArgument, ($env:UserName));
|
||||||
|
|
|
@ -8,13 +8,6 @@ param (
|
||||||
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Add-PowerShellProfileStatement `
|
Add-PowerShellProfileStatement `
|
||||||
-System `
|
-System `
|
||||||
|
|
|
@ -8,13 +8,6 @@ param (
|
||||||
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
[string] $globalDir = $null;
|
[string] $globalDir = $null;
|
||||||
$indicator = "# Profile Files";
|
$indicator = "# Profile Files";
|
||||||
|
|
|
@ -7,12 +7,5 @@ param (
|
||||||
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
)
|
)
|
||||||
|
|
||||||
Install-ChocoPackage firefox;
|
Install-ChocoPackage firefox;
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Write-Host "Making Firefox the default browser…";
|
Write-Host "Making Firefox the default browser…";
|
||||||
|
|
|
@ -12,7 +12,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
)
|
)
|
||||||
|
|
||||||
Install-ChocoPackage MSEdgeRedirect;
|
Install-ChocoPackage MSEdgeRedirect;
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
$configPath = "HKLM:\SOFTWARE\Robert Maehl Software\MSEdgeRedirect";
|
$configPath = "HKLM:\SOFTWARE\Robert Maehl Software\MSEdgeRedirect";
|
||||||
|
|
|
@ -22,7 +22,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
|
|
||||||
refreshenv;
|
refreshenv;
|
||||||
Set-UserPermissions $env:NVS_HOME;
|
Set-UserPermissions $env:NVS_HOME;
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
nvs add latest;
|
nvs add latest;
|
||||||
|
|
|
@ -13,7 +13,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
)
|
)
|
||||||
|
|
||||||
Install-WingetPackage JanDeDobbeleer.OhMyPosh -ArgumentList "--scope","machine";
|
Install-WingetPackage JanDeDobbeleer.OhMyPosh -ArgumentList "--scope","machine";
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
. "$PSScriptRoot/../../../Common/Software/Oh My Posh/Manage.ps1" `
|
. "$PSScriptRoot/../../../Common/Software/Oh My Posh/Manage.ps1" `
|
||||||
|
|
|
@ -8,13 +8,6 @@ param(
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Set-Service ssh-agent -StartupType AutomaticDelayedStart;
|
Set-Service ssh-agent -StartupType AutomaticDelayedStart;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,13 +7,6 @@ param (
|
||||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
. "$PSScriptRoot/../../../Common/Software/PowerShell/Manage.ps1" `
|
. "$PSScriptRoot/../../../Common/Software/PowerShell/Manage.ps1" `
|
||||||
-Action ([InstallerAction]::Configure);
|
-Action ([InstallerAction]::Configure);
|
||||||
|
|
|
@ -15,7 +15,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
)
|
)
|
||||||
|
|
||||||
Install-ChocoPackage thunderbird -ArgumentList "--params",'"/NoTaskbarShortcut /NoDesktopShortcut"'
|
Install-ChocoPackage thunderbird -ArgumentList "--params",'"/NoTaskbarShortcut /NoDesktopShortcut"'
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Write-Host "Making Thunderbird the default mail program…";
|
Write-Host "Making Thunderbird the default mail program…";
|
||||||
|
|
|
@ -16,7 +16,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
)
|
)
|
||||||
|
|
||||||
Install-ChocoPackage winscp;
|
Install-ChocoPackage winscp;
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Remove-DesktopIcon "WinSCP*";
|
Remove-DesktopIcon "WinSCP*";
|
||||||
|
|
|
@ -12,13 +12,6 @@ param(
|
||||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
$dir = New-TemporaryDirectory;
|
$dir = New-TemporaryDirectory;
|
||||||
Push-Location $dir;
|
Push-Location $dir;
|
||||||
|
|
|
@ -8,13 +8,6 @@ param(
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
|
||||||
param(
|
|
||||||
[scriptblock] $Installer
|
|
||||||
)
|
|
||||||
|
|
||||||
& $Installer -Action ([InstallerAction]::Configure)
|
|
||||||
} `
|
|
||||||
-Configurator {
|
-Configurator {
|
||||||
[string] $backup = $null;
|
[string] $backup = $null;
|
||||||
$nativeProfile = powershell -c '$PROFILE';
|
$nativeProfile = powershell -c '$PROFILE';
|
||||||
|
|
|
@ -54,7 +54,6 @@ $null = New-Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
Install-ChocoPackage git -ArgumentList "--params",$params;
|
Install-ChocoPackage git -ArgumentList "--params",$params;
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
& "$PSScriptRoot/../../../Common/Software/git/Manage.ps1" @Parameters;
|
& "$PSScriptRoot/../../../Common/Software/git/Manage.ps1" @Parameters;
|
||||||
|
|
|
@ -14,7 +14,6 @@ Start-SoftwareInstaller @PSBoundParameters `
|
||||||
|
|
||||||
Install-ChocoPackage zoxide;
|
Install-ChocoPackage zoxide;
|
||||||
Install-WingetPackage junegunn.fzf;
|
Install-WingetPackage junegunn.fzf;
|
||||||
& $Installer -Action ([InstallerAction]::Configure);
|
|
||||||
} `
|
} `
|
||||||
-Configurator {
|
-Configurator {
|
||||||
Add-PowerShellProfileStatement `
|
Add-PowerShellProfileStatement `
|
||||||
|
|
Loading…
Reference in a new issue