Add a task for disabling UAC
This commit is contained in:
parent
4ebf214acc
commit
015f7d2901
|
@ -8,6 +8,7 @@ using namespace System.Security.Principal;
|
||||||
. "$PSScriptRoot/../Scripts/Security.ps1";
|
. "$PSScriptRoot/../Scripts/Security.ps1";
|
||||||
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
|
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
|
||||||
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
|
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
|
||||||
|
. "$PSScriptRoot/../../Common/Types/OneShotTask.ps1";
|
||||||
|
|
||||||
$null = New-Module {
|
$null = New-Module {
|
||||||
. "$PSScriptRoot/../Scripts/Hooks.ps1";
|
. "$PSScriptRoot/../Scripts/Hooks.ps1";
|
||||||
|
@ -21,6 +22,7 @@ $null = New-Module {
|
||||||
. "$PSScriptRoot/../../Common/Scripts/Software.ps1";
|
. "$PSScriptRoot/../../Common/Scripts/Software.ps1";
|
||||||
. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1";
|
. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1";
|
||||||
. "$PSScriptRoot/../../Common/Types/InstallerAction.ps1";
|
. "$PSScriptRoot/../../Common/Types/InstallerAction.ps1";
|
||||||
|
. "$PSScriptRoot/../../Common/Types/OneShotTask.ps1";
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
@ -134,6 +136,20 @@ $null = New-Module {
|
||||||
Set-Stage ([SetupStage]::Configure);
|
Set-Stage ([SetupStage]::Configure);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
([SetupStage]::OneShot) {
|
||||||
|
Write-Host "Running a OneShot task";
|
||||||
|
|
||||||
|
Start-OneShot {
|
||||||
|
Write-Host "task is-a running!";
|
||||||
|
switch (Get-OneShotTask) {
|
||||||
|
([OneShotTask]::DisableUAC) {
|
||||||
|
Disable-UAC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default {
|
default {
|
||||||
if (-not (& { $null = wsl -l; $? })) {
|
if (-not (& { $null = wsl -l; $? })) {
|
||||||
wsl --import-in-place "PortValhalla" "$wslLocation/ext4.vhdx";
|
wsl --import-in-place "PortValhalla" "$wslLocation/ext4.vhdx";
|
||||||
|
|
Loading…
Reference in a new issue