From bb6319d5f125ffca0fe6b74cd4fc238871e65008 Mon Sep 17 00:00:00 2001 From: admin_tan Date: Thu, 11 Jun 2026 12:24:49 +0200 Subject: [PATCH] Actualiser Copy-PowerBGInfoGlobal.ps1 --- Copy-PowerBGInfoGlobal.ps1 | 74 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/Copy-PowerBGInfoGlobal.ps1 b/Copy-PowerBGInfoGlobal.ps1 index 5b3a958..af1209c 100644 --- a/Copy-PowerBGInfoGlobal.ps1 +++ b/Copy-PowerBGInfoGlobal.ps1 @@ -1,38 +1,36 @@ -# ============================================================ -# CONFIG -# ============================================================ -$BaseUrl = "https://repo.luckyden.org/admin_tan/PowerBGInfoGlobal/src/branch/main/PowerBGInfoGlobal.zip" - -$ModuleZip = "$env:TEMP\PowerBGInfoGlobal.zip" -$ModuleDest = "$Env:ProgramFiles\WindowsPowerShell\Modules" - -$DataPath = "C:\ProgramData\PowerBGInfo" -$WallpaperPath = "C:\Windows\Web\Wallpaper\Windows\img19-resize.jpg" - -# ============================================================ -# DOSSIERS -# ============================================================ -New-Item -Path $DataPath -ItemType Directory -Force | Out-Null - -# ============================================================ -# DOWNLOAD -# ============================================================ -Invoke-WebRequest "$BaseUrl/PowerBGInfoGlobal.zip" -OutFile $ModuleZip -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 - -# ============================================================ -# INSTALL MODULE -# ============================================================ -Expand-Archive $ModuleZip -DestinationPath $ModuleDest -Force - -# ============================================================ -# CREATE SCHEDULED TASK -# ============================================================ -& "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1" - -# ============================================================ -# FIRST RUN -# ============================================================ -& "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1" +# ============================================================ +# CONFIG +# ============================================================ +$BaseUrl = "https://repo.luckyden.org/admin_tan/PowerBGInfoGlobal/src/branch/main" + +$ModuleDest = "$Env:ProgramFiles\WindowsPowerShell\Modules" + +$DataPath = "C:\ProgramData\PowerBGInfo" +$WallpaperPath = "C:\Windows\Web\Wallpaper\Windows\img19-resize.jpg" + +# ============================================================ +# DOSSIERS +# ============================================================ +New-Item -Path $DataPath -ItemType Directory -Force | Out-Null + +# ============================================================ +# 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 + +# ============================================================ +# INSTALL MODULE +# ============================================================ +Expand-Archive -DestinationPath $ModuleDest -Force + +# ============================================================ +# CREATE SCHEDULED TASK +# ============================================================ +& "$DataPath\Set-ScheduledTaskPowerBGInfo.ps1" + +# ============================================================ +# FIRST RUN +# ============================================================ +& "$DataPath\Set-WallpaperPowerBGInfoGlobal.ps1"