Compare commits
5 commits
af0f1dce3e
...
5f6b9c05bb
Author | SHA1 | Date | |
---|---|---|---|
Manuel Thalmann | 5f6b9c05bb | ||
Manuel Thalmann | 36a070bdd7 | ||
Manuel Thalmann | b447d37f62 | ||
Manuel Thalmann | b6a1f7323c | ||
Manuel Thalmann | ca3792320d |
|
@ -89,6 +89,10 @@ $null = New-Module {
|
|||
|
||||
fish -c ". $(ConvertTo-LinuxPath $scriptPath); $Script" | ConvertFrom-Json;
|
||||
}
|
||||
|
||||
if (-not $?) {
|
||||
throw "The configuration could not be retrieved!";
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
. "$PSScriptRoot/Config.ps1";
|
||||
. "$PSScriptRoot/../Types/OneShotTask.ps1";
|
||||
. "$PSScriptRoot/../../Windows/Scripts/PowerManagement.ps1";
|
||||
. "$PSScriptRoot/../../Windows/Scripts/Registry.ps1";
|
||||
|
||||
$null = New-Module {
|
||||
. "$PSScriptRoot/../Types/OneShotTask.ps1";
|
||||
|
@ -28,6 +29,7 @@ $null = New-Module {
|
|||
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
|
||||
}
|
||||
|
||||
Disable-WindowsUpdateAutoRestart;
|
||||
New-Alias -Force "sudo" gsudo;
|
||||
& $Action;
|
||||
}
|
||||
|
|
|
@ -193,9 +193,19 @@ $null = New-Module {
|
|||
& {
|
||||
$driverPath = "$PSScriptRoot/../Drivers";
|
||||
$mbPath = "$driverPath/ROG Zenith Extreme Alpha";
|
||||
|
||||
if ($install) {
|
||||
if (Get-Config "valhalla.hardware.elgatoWave") {
|
||||
if (-not (Test-ChocoPackage wavelink)) {
|
||||
Install-ChocoPackage wavelink -ArgumentList '--install-arguments="/norestart"';
|
||||
Remove-DesktopIcon "*Wave Link*";
|
||||
Restart-Intermediate;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($component in (Get-Config "valhalla.hardware.components")) {
|
||||
|
||||
switch ($component) {
|
||||
("ROG Zenith Extreme Alpha") {
|
||||
& "$mbPath/MarvellEthernet/Manage.ps1" @arguments;
|
||||
|
@ -224,15 +234,6 @@ $null = New-Module {
|
|||
if (Get-Config "valhalla.hardware.corsairDevice") {
|
||||
Install-ChocoPackage icue;
|
||||
}
|
||||
|
||||
if (Get-Config "valhalla.hardware.elgatoWave") {
|
||||
if (-not (Test-ChocoPackage wavelink)) {
|
||||
Install-ChocoPackage wavelink -ArgumentList '--install-arguments="/norestart"';
|
||||
Remove-DesktopIcon "*Wave Link*";
|
||||
Restart-Intermediate;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Get-Config "valhalla.hardware.eyeX") {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using namespace Microsoft.Win32;
|
||||
|
||||
$null = New-Module {
|
||||
$wuPolicyPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate";
|
||||
|
||||
function Edit-DefaultUserKey {
|
||||
param(
|
||||
[scriptblock] $Action
|
||||
|
@ -53,4 +55,25 @@ $null = New-Module {
|
|||
function Disable-BootMessage {
|
||||
Set-BootMessage;
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables automatic reboots by Windows Update.
|
||||
#>
|
||||
function Disable-WindowsUpdateAutoRestart {
|
||||
$path = "$wuPolicyPath\AU";
|
||||
New-Item -Force $path -ErrorAction SilentlyContinue;
|
||||
|
||||
Set-ItemProperty $path `
|
||||
-Name NoAutoRebootWithLoggedOnUsers `
|
||||
-Value $Value;
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Resets the automatic reboot state.
|
||||
#>
|
||||
function Reset-WindowsUpdateAutoRestart {
|
||||
Remove-Item -Recurse "$wuPolicyPath";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue