Skip to content

Commit

Permalink
fix(chezmoi): add reactivating storage drive script
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed Jan 8, 2025
1 parent 8312cee commit d0d6699
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions chezmoi/manualresources/windows/kvm_storage_boot.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# get a list of storage drivers as parameters

if ($args.Count -eq 0) {
echo "Must indicate at least 1 storage driver name"
exit 1
}

$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -path C:\kvm-script.txt -append

$rootPath = "HKLM:\SYSTEM\ControlSet001\Services\"
$tailPath = "\StartOverride"

foreach ($p in $args) {
echo ("Checking: "+$rootPath+$p+$tailPath)
if (Test-Path ($rootPath+$p+$tailPath)) {
echo ($rootPath+$p+$tailPath) "exists"
Set-ItemProperty -Name "0" -Path ($rootPath+$p+$tailPath) -Value 0
}
}

Stop-Transcript

0 comments on commit d0d6699

Please sign in to comment.