Skip to content

Commit

Permalink
Fixed bug when CleanupTask function couldn't create a value in the Br…
Browse files Browse the repository at this point in the history
…anchCache
  • Loading branch information
farag2 committed Jul 16, 2022
1 parent b9fa5ad commit 61c417a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7375,6 +7375,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8475,6 +8475,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10729,6 +10729,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down
4 changes: 4 additions & 0 deletions Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10688,6 +10688,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10192,6 +10192,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down
4 changes: 4 additions & 0 deletions Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10152,6 +10152,10 @@ function CleanupTask
)
foreach ($VolumeCache in $VolumeCaches)
{
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache"))
{
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Force
}
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\$VolumeCache" -Name StateFlags1337 -PropertyType DWord -Value 2 -Force
}

Expand Down

0 comments on commit 61c417a

Please sign in to comment.