Closed ThisFungus closed 5 months ago
@ThisFungus Could you provide an example of the error you encountered with the old script and an explanation of how this change fixes it? As far as I can tell the -Path
parameter must be a string, and since params.imagePaths
is an array we need to pass only the first item.
@t1m0thyj Weird, after updating to OS Build 22631.3737 (may or may not be relevant for this case), I can confirm that the line:
Set-DesktopWallpaper -Desktop $_.Number -Path $params.imagePaths[0]
is now working correctly, and I am no longer able to replicate the bug I previously encountered. As a result, I'm closing this pull request.
This change ensures that the Set-DesktopWallpaper command correctly applies the wallpaper to all virtual desktops, including the current one, by removing the incorrect index reference from the $params.imagePaths array.