Skip to content

Commit

Permalink
fix(backup): correct argument name
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jan 16, 2024
1 parent a0f1a3a commit 330ad52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/playbook/Executables/BACKUP.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
param (
[Parameter( Mandatory = $True )]
[string]$FileName
[string]$FilePath
)

if (Test-Path $FileName) { exit }
if (Test-Path $FilePath) { exit }

Add-Content -Path $FileName -Value "Windows Registry Editor Version 5.00"
Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services" | ForEach-Object {
if ((Get-ItemProperty $_.PSPath).PSObject.Properties.Name -contains "Start") {
$startValue = (Get-ItemProperty -Path $_.PSPath -Name "Start").Start
for ($c = 0; $c -le 4; $c++) {
if ($startValue -eq "0x$c") {
Add-Content -Path $FileName -Value ("`n" + "[" + $_.Name + "]")
Add-Content -Path $FileName -Value ("`"Start`"=dword:0000000$c")
Add-Content -Path $FilePath -Value ("`n" + "[" + $_.Name + "]")
Add-Content -Path $FilePath -Value ("`"Start`"=dword:0000000$c")
}
}
}
Expand Down

0 comments on commit 330ad52

Please sign in to comment.