Update refind_bg_randomizer.ps1

This commit is contained in:
ryanrudolfoba 2023-11-24 11:49:17 -05:00 committed by GitHub
parent e131c9ab53
commit 108efc8b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ https://github.com/ryanrudolfoba/
Prerequisites:
Place png images that you wish to use as backgrounds for rEFInd here -
C:\refind\backgrounds
C:\refind_scripts\backgrounds
Place this script in a scheduled task to automatically run at startup.
@ -16,7 +16,7 @@ Clear-Host
# set variables for ESP and random background
Set-Variable -Name "ESP" -value (Compare-Object -PassThru (Get-PsDrive [A-Z]).Name ([char[]] 'DEFGHIJKLMNOPQRSTUVWXYZ') | Select-Object -first 1)
Set-Variable -Name "RandomBackground" -value (Get-ChildItem -Path "c:\refind\backgrounds\*.png" | Get-Random -count 1)
Set-Variable -Name "RandomBackground" -value (Get-ChildItem -Path "c:\refind_scripts\backgrounds\*.png" | Get-Random -count 1)
# mount ESP partition to the next available drive letter
mountvol $ESP`: /s
@ -32,4 +32,4 @@ exit}
else {
Write-Host "Error mounting ESP partition. Exiting immediately."
exit}
exit}