11 lines
552 B
PowerShell
11 lines
552 B
PowerShell
$ErrorActionPreference = "Stop"
|
|
$InstallDir = Join-Path $env:LOCALAPPDATA "Programs\drosync"
|
|
$Startup = [Environment]::GetFolderPath("Startup")
|
|
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
|
Copy-Item (Join-Path $PSScriptRoot "..\..\target\x86_64-pc-windows-msvc\release\drosync*.exe") $InstallDir
|
|
$Shell = New-Object -ComObject WScript.Shell
|
|
$Shortcut = $Shell.CreateShortcut((Join-Path $Startup "drosync.lnk"))
|
|
$Shortcut.TargetPath = Join-Path $InstallDir "drosync-gui.exe"
|
|
$Shortcut.WorkingDirectory = $InstallDir
|
|
$Shortcut.Save()
|