Desktop shortcuts for Windows
Put parks.cloud, or each of its projects, on a Windows desktop as a shortcut with its own icon. Pick one below, copy the PowerShell script it shows, paste it into PowerShell, and press Enter.
- Open PowerShell with Run as administrator to add the shortcuts for every user of the PC: they go on the Public desktop, with their icons in Public Pictures.
- Open it normally to add them for yourself alone: on your desktop, with the icons in your Pictures folder.
The script downloads each site’s icon and makes a shortcut that opens the site in your default browser. It changes nothing else, and running it again skips any shortcut already there. To remove one, delete the shortcut; its icon stays in Pictures until you delete that too.
-
parks.cloud
One shortcut, to this notebook.
Show the script
& { # parks.cloud desktop shortcuts: parks.cloud. From https://parks.cloud/shortcuts/ # In PowerShell opened with Run as administrator, it adds the shortcuts for every user of # this PC; in a normal PowerShell window, for you alone. It downloads each site's icon and # makes a shortcut that opens the site in your default browser. Nothing else changes. $shortcuts = @( @{ Name = 'parks.cloud'; Url = 'https://parks.cloud/'; Icon = 'https://parks.cloud/parkscloud.ico'; File = 'parkscloud.ico' } ) $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) $publicDesktop = 'C:\Users\Public\Desktop' if ($isAdmin) { $desktopDir = $publicDesktop $iconDir = 'C:\Users\Public\Pictures' Write-Host 'Administrator: adding shortcuts for every user of this PC.' } else { $desktopDir = [Environment]::GetFolderPath('DesktopDirectory') $iconDir = [Environment]::GetFolderPath('MyPictures') if ([string]::IsNullOrEmpty($desktopDir)) { $desktopDir = Join-Path $env:USERPROFILE 'Desktop' } if ([string]::IsNullOrEmpty($iconDir)) { $iconDir = Join-Path $env:USERPROFILE 'Pictures' } Write-Host "Not an administrator: adding shortcuts for $env:USERNAME only." } [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 if (-not (Test-Path -Path $iconDir)) { New-Item -ItemType Directory -Path $iconDir -Force | Out-Null } $shell = New-Object -ComObject WScript.Shell foreach ($s in $shortcuts) { $lnk = Join-Path $desktopDir ($s.Name + '.lnk') if (Test-Path -Path $lnk) { Write-Host "$($s.Name): already on the desktop, left as it is." continue } if ((-not $isAdmin) -and (Test-Path -Path (Join-Path $publicDesktop ($s.Name + '.lnk')))) { Write-Host "$($s.Name): already on every user's desktop, nothing to do." continue } $ico = Join-Path $iconDir $s.File try { Invoke-WebRequest -Uri $s.Icon -OutFile $ico -UseBasicParsing } catch { Write-Host "$($s.Name): could not download $($s.Icon), so no shortcut was made." continue } $link = $shell.CreateShortcut($lnk) $link.TargetPath = $s.Url $link.IconLocation = $ico $link.Save() Write-Host "$($s.Name): shortcut added to $desktopDir" } Write-Host 'Done.' } -
Every project
One shortcut each: Case Converter, NATO Phonetic Trainer, Password Generator.
Show the script
& { # parks.cloud desktop shortcuts: every project. From https://parks.cloud/shortcuts/ # In PowerShell opened with Run as administrator, it adds the shortcuts for every user of # this PC; in a normal PowerShell window, for you alone. It downloads each site's icon and # makes a shortcut that opens the site in your default browser. Nothing else changes. $shortcuts = @( @{ Name = 'Case Converter'; Url = 'https://caseconverter.parks.cloud/'; Icon = 'https://caseconverter.parks.cloud/caseconverter.ico'; File = 'caseconverter.ico' } @{ Name = 'NATO Phonetic Trainer'; Url = 'https://phonetic.parks.cloud/'; Icon = 'https://phonetic.parks.cloud/phonetic.ico'; File = 'phonetic.ico' } @{ Name = 'Password Generator'; Url = 'https://password.parks.cloud/'; Icon = 'https://password.parks.cloud/password.ico'; File = 'password.ico' } ) $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) $publicDesktop = 'C:\Users\Public\Desktop' if ($isAdmin) { $desktopDir = $publicDesktop $iconDir = 'C:\Users\Public\Pictures' Write-Host 'Administrator: adding shortcuts for every user of this PC.' } else { $desktopDir = [Environment]::GetFolderPath('DesktopDirectory') $iconDir = [Environment]::GetFolderPath('MyPictures') if ([string]::IsNullOrEmpty($desktopDir)) { $desktopDir = Join-Path $env:USERPROFILE 'Desktop' } if ([string]::IsNullOrEmpty($iconDir)) { $iconDir = Join-Path $env:USERPROFILE 'Pictures' } Write-Host "Not an administrator: adding shortcuts for $env:USERNAME only." } [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 if (-not (Test-Path -Path $iconDir)) { New-Item -ItemType Directory -Path $iconDir -Force | Out-Null } $shell = New-Object -ComObject WScript.Shell foreach ($s in $shortcuts) { $lnk = Join-Path $desktopDir ($s.Name + '.lnk') if (Test-Path -Path $lnk) { Write-Host "$($s.Name): already on the desktop, left as it is." continue } if ((-not $isAdmin) -and (Test-Path -Path (Join-Path $publicDesktop ($s.Name + '.lnk')))) { Write-Host "$($s.Name): already on every user's desktop, nothing to do." continue } $ico = Join-Path $iconDir $s.File try { Invoke-WebRequest -Uri $s.Icon -OutFile $ico -UseBasicParsing } catch { Write-Host "$($s.Name): could not download $($s.Icon), so no shortcut was made." continue } $link = $shell.CreateShortcut($lnk) $link.TargetPath = $s.Url $link.IconLocation = $ico $link.Save() Write-Host "$($s.Name): shortcut added to $desktopDir" } Write-Host 'Done.' }