Files
PowerBGInfoCORPORATE/Copy-PowerBGInfoGlobal.ps1
T

32 lines
1.4 KiB
PowerShell
Raw Normal View History

2026-06-11 12:24:49 +02:00
# ============================================================
# CONFIG
# ============================================================
2026-06-11 12:26:30 +02:00
$BaseUrl = "https://repo.luckyden.org/admin_tan/PowerBGInfoGlobal/raw/branch/main"
2026-06-11 12:24:49 +02:00
$DataPath = "C:\ProgramData\PowerBGInfo"
$WallpaperPath = "C:\Windows\Web\Wallpaper\Windows\img19-resize.jpg"
# ============================================================
# DOSSIERS
# ============================================================
2026-06-11 12:28:58 +02:00
if (!(Test-Path $DataPath)) {
New-Item -ItemType Directory -Path $DataPath -Force
}
2026-06-11 12:24:49 +02:00
# ============================================================
# DOWNLOAD
# ============================================================
Invoke-WebRequest "$BaseUrl/Set-WallpaperPowerBGInfoGlobal.ps1" -OutFile "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"
Invoke-WebRequest "$BaseUrl/Set-ScheduledTaskPowerBGInfo.ps1" -OutFile "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1"
Invoke-WebRequest "$BaseUrl/img19-resize.jpg" -OutFile $WallpaperPath
# ============================================================
# CREATE SCHEDULED TASK
# ============================================================
& "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1"
# ============================================================
# FIRST RUN
# ============================================================
& "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"