Skip to content

Instantly share code, notes, and snippets.

@wise-io
Last active February 13, 2022 21:05
Show Gist options
  • Save wise-io/3b0ea45654a30fb77d6b363a6ef40663 to your computer and use it in GitHub Desktop.
Save wise-io/3b0ea45654a30fb77d6b363a6ef40663 to your computer and use it in GitHub Desktop.
Downloads Splashtop SOS & Creates Shortcut
SplashtopSOS.ps1
# Downloads Splashtop SOS & creates desktop shortcut
$Executable = "$env:SystemDrive\Utilities\SplashtopSOS.exe"
$DownloadURL = 'https://download.splashtop.com/sos/SplashtopSOS.exe'
try {
# Create Directory
if (!(Test-Path (Split-Path $Executable))) { New-Item -ItemType Directory -Force -Path (Split-Path $Executable) }
# Download Splashtop SOS
Write-Output 'Downloading Splashtop SOS...'
Invoke-WebRequest -Uri $DownloadURL -OutFile $Executable
# Create Public Desktop Shortcut
Write-Output 'Creating desktop shortcut...'
$ShortcutFile = "$env:Public\Desktop\Splashtop SOS.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $Executable
$Shortcut.Save()
}
catch { throw $Error }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment