$ErrorActionPreference = "Stop"
$dest = Join-Path $env:LOCALAPPDATA "ScreenSVP"
$target = Join-Path $dest "screensvp-desktop.exe"
$s = New-Object -ComObject WScript.Shell
$desk = [Environment]::GetFolderPath("Desktop")
$l = $s.CreateShortcut((Join-Path $desk "ScreenSVP.lnk"))
$l.TargetPath = $target
$l.WorkingDirectory = $dest
$l.Save()
$sm = Join-Path ([Environment]::GetFolderPath("StartMenu")) "Programs\ScreenSVP"
New-Item -ItemType Directory -Force -Path $sm | Out-Null
$l2 = $s.CreateShortcut((Join-Path $sm "ScreenSVP.lnk"))
$l2.TargetPath = $target
$l2.WorkingDirectory = $dest
$l2.Save()
