Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backdrop.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function Set-Wallpaper {
function Invoke-TimerConfig {
$action = New-ScheduledTaskAction `
-Execute 'powershell.exe' `
-Argument "-NonInteractive -WindowStyle Hidden -Command `"Import-Module backdrop; backdrop update`""
-Argument "-NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command `"Import-Module backdrop; backdrop update`""

if ($script:RotateInterval -gt 0) {
$timeTrigger = New-ScheduledTaskTrigger -Daily -At '00:00'
Expand Down
3 changes: 3 additions & 0 deletions src/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ try {
Write-Host "backdrop: installed to $destDir"

# Load the module and enable the scheduled task.
# Process-scoped so it doesn't touch the system-wide execution policy; it only
# affects this powershell.exe instance and disappears when it exits.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
Import-Module (Join-Path $destDir 'backdrop.psm1') -Force
backdrop enable

Expand Down