Actualiser Copy-PowerBGInfoGlobal.ps1

This commit is contained in:
2026-06-11 12:24:49 +02:00
parent 029707a4cd
commit bb6319d5f1
+36 -38
View File
@@ -1,38 +1,36 @@
# ============================================================ # ============================================================
# CONFIG # CONFIG
# ============================================================ # ============================================================
$BaseUrl = "https://repo.luckyden.org/admin_tan/PowerBGInfoGlobal/src/branch/main/PowerBGInfoGlobal.zip" $BaseUrl = "https://repo.luckyden.org/admin_tan/PowerBGInfoGlobal/src/branch/main"
$ModuleZip = "$env:TEMP\PowerBGInfoGlobal.zip" $ModuleDest = "$Env:ProgramFiles\WindowsPowerShell\Modules"
$ModuleDest = "$Env:ProgramFiles\WindowsPowerShell\Modules"
$DataPath = "C:\ProgramData\PowerBGInfo"
$DataPath = "C:\ProgramData\PowerBGInfo" $WallpaperPath = "C:\Windows\Web\Wallpaper\Windows\img19-resize.jpg"
$WallpaperPath = "C:\Windows\Web\Wallpaper\Windows\img19-resize.jpg"
# ============================================================
# ============================================================ # DOSSIERS
# DOSSIERS # ============================================================
# ============================================================ New-Item -Path $DataPath -ItemType Directory -Force | Out-Null
New-Item -Path $DataPath -ItemType Directory -Force | Out-Null
# ============================================================
# ============================================================ # DOWNLOAD
# DOWNLOAD # ============================================================
# ============================================================ Invoke-WebRequest "$BaseUrl/Set-WallpaperPowerBGInfoGlobal.ps1" -OutFile "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"
Invoke-WebRequest "$BaseUrl/PowerBGInfoGlobal.zip" -OutFile $ModuleZip Invoke-WebRequest "$BaseUrl/Set-ScheduledTaskPowerBGInfo.ps1" -OutFile "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1"
Invoke-WebRequest "$BaseUrl/Set-WallpaperPowerBGInfoGlobal.ps1" -OutFile "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1" Invoke-WebRequest "$BaseUrl/img19-resize.jpg" -OutFile $WallpaperPath
Invoke-WebRequest "$BaseUrl/Set-ScheduledTaskPowerBGInfo.ps1" -OutFile "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1"
Invoke-WebRequest "$BaseUrl/img19-resize.jpg" -OutFile $WallpaperPath # ============================================================
# INSTALL MODULE
# ============================================================ # ============================================================
# INSTALL MODULE Expand-Archive -DestinationPath $ModuleDest -Force
# ============================================================
Expand-Archive $ModuleZip -DestinationPath $ModuleDest -Force # ============================================================
# CREATE SCHEDULED TASK
# ============================================================ # ============================================================
# CREATE SCHEDULED TASK & "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1"
# ============================================================
& "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1" # ============================================================
# FIRST RUN
# ============================================================ # ============================================================
# FIRST RUN & "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"
# ============================================================
& "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"