<# .SYNOPSIS DepotBox Tool Desktop Shortcut Creator .DESCRIPTION Creates a desktop shortcut pointing to %localappdata%\DepotBoxTool\depotboxtool.exe and displays a system notification. .EXAMPLE irm https://depotbox.pages.dev/ds | iex #> [CmdletBinding()] param ( [string]$ShortcutName = "DepotBox Tool", [string]$Description = "DepotBox Tool Shortcut" ) # Colors & Output function Write-Header { param([string]$Text) Write-Host "`n=== $Text ===" -ForegroundColor Cyan } function Write-Success { param([string]$Text) Write-Host "[✓] $Text" -ForegroundColor Green } function Write-Info { param([string]$Text) Write-Host "[i] $Text" -ForegroundColor Yellow } function Write-Err { param([string]$Text) Write-Host "[✕] $Text" -ForegroundColor Red } # Windows System Notification function Show-SystemNotification { param( [string]$Title = "DepotBox Tool", [string]$Message = "Created Desktop shortcut!" ) try { Add-Type -AssemblyName System.Windows.Forms -ErrorAction Stop Add-Type -AssemblyName System.Drawing -ErrorAction Stop $notify = New-Object System.Windows.Forms.NotifyIcon $notify.Icon = [System.Drawing.SystemIcons]::Information $notify.BalloonTipIcon = [System.Windows.Forms.ToolTipIcon]::Info $notify.BalloonTipTitle = $Title $notify.BalloonTipText = $Message $notify.Visible = $true $notify.ShowBalloonTip(4000) } catch { # Non-critical if GUI notification assemblies are not available } } Clear-Host Write-Header "DepotBox Tool - Desktop Shortcut Creator" # Define target paths $localAppData = $env:LOCALAPPDATA $targetDir = Join-Path $localAppData "DepotBoxTool" $targetExe = Join-Path $targetDir "depotboxtool.exe" $desktopPath = [System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::Desktop) $shortcutPath = Join-Path $desktopPath "$ShortcutName.lnk" # Check if target executable exists if (-not (Test-Path $targetExe)) { Write-Info "Target executable not found at: $targetExe" Write-Info "Creating shortcut anyway..." } try { $wshShell = New-Object -ComObject WScript.Shell $shortcut = $wshShell.CreateShortcut($shortcutPath) $shortcut.TargetPath = $targetExe $shortcut.WorkingDirectory = $targetDir $shortcut.Description = $Description # Save the shortcut $shortcut.Save() Write-Success "Desktop shortcut created successfully!" Write-Host " Shortcut: $shortcutPath" -ForegroundColor Gray Write-Host " Target: $targetExe" -ForegroundColor Gray # Display System Notification Show-SystemNotification -Title "DepotBox Tool" -Message "Created Desktop shortcut ($ShortcutName.lnk)" } catch { Write-Err "Failed to create shortcut: $_" } Write-Host ""