diff --git a/cleanup.ps1 b/cleanup.ps1 index 33e8f40..7e3b085 100644 --- a/cleanup.ps1 +++ b/cleanup.ps1 @@ -13,6 +13,12 @@ if (-not (Test-Path $LogDirectory)) { New-Item -Path $LogDirectory -ItemType Directory -Force | Out-Null } +# Download icon +$iconUrl = "https://git.questcomputers.be/quest-scripts/scripts/raw/branch/main/assets/logo.ico" +$iconPath = "$env:TEMP\icon.ico" + +Invoke-WebRequest -Uri $iconUrl -OutFile $iconPath -UseBasicParsing + # Form Add-Type -AssemblyName System.Windows.Forms @@ -22,7 +28,7 @@ $form.Size = New-Object System.Drawing.Size(320, 160) $form.StartPosition = "CenterScreen" $form.Topmost = $true $form.KeyPreview = $true -$form.Icon = New-Object System.Drawing.Icon("https://git.questcomputers.be/quest-scripts/scripts/raw/branch/main/assets/logo.ico") +$form.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath) # Form label $lbl = New-Object System.Windows.Forms.Label