18 lines
700 B
PowerShell
18 lines
700 B
PowerShell
$startup = [Environment]::GetFolderPath("Startup")
|
|
$shortcutPath = Join-Path $startup "WriteBot.lnk"
|
|
$targetPath = "E:\GitHub\blog\bot\start-tray.vbs"
|
|
|
|
$wsh = New-Object -ComObject WScript.Shell
|
|
$shortcut = $wsh.CreateShortcut($shortcutPath)
|
|
$shortcut.TargetPath = "wscript.exe"
|
|
$shortcut.Arguments = "`"$targetPath`""
|
|
$shortcut.WorkingDirectory = "E:\GitHub\blog\bot"
|
|
$shortcut.WindowStyle = 7 # Minimized
|
|
$shortcut.Description = "WriteBot tray launcher"
|
|
$shortcut.IconLocation = "wscript.exe,0"
|
|
$shortcut.Save()
|
|
|
|
Write-Host "Startup folder: $startup"
|
|
Write-Host "Shortcut created: $shortcutPath"
|
|
Write-Host ""
|
|
Get-ChildItem -LiteralPath $shortcutPath | Format-List Name, FullName, LastWriteTime |