PortValhalla/scripts/Windows/Software/NVS/Manage.ps1

31 lines
801 B
PowerShell
Raw Normal View History

2024-08-08 02:36:35 +00:00
using namespace System.Security.AccessControl;
using namespace System.Security.Principal;
param(
$Action,
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Security.ps1";
2024-08-08 02:36:35 +00:00
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
2024-08-08 12:09:20 +00:00
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
2024-08-08 02:36:35 +00:00
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
2024-08-08 12:09:20 +00:00
param(
[scriptblock] $Installer
)
2024-08-08 02:36:35 +00:00
$env:NVS_HOME = "$env:ProgramData\nvs";
git clone "https://github.com/jasongin/nvs.git" $env:NVS_HOME;
& "$env:NVS_HOME\nvs.cmd" install;
refreshenv;
Set-UserPermissions $env:NVS_HOME;
2024-08-08 12:09:20 +00:00
& $Installer -Action ([InstallerAction]::Configure);
2024-08-08 02:36:35 +00:00
} `
-Configurator {
nvs add latest;
nvs link latest;
};