From 029707a4cd96b0151374c4084d3c343b97c243a6 Mon Sep 17 00:00:00 2001 From: admin_tan Date: Thu, 11 Jun 2026 12:14:35 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Copy-PowerBGInfoGlobal.ps1 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Copy-PowerBGInfoGlobal.ps1 diff --git a/Copy-PowerBGInfoGlobal.ps1 b/Copy-PowerBGInfoGlobal.ps1 new file mode 100644 index 0000000..5b3a958 --- /dev/null +++ b/Copy-PowerBGInfoGlobal.ps1 @@ -0,0 +1,38 @@ +# ============================================================ +# 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"