39 lines
1.2 KiB
PowerShell
39 lines
1.2 KiB
PowerShell
# Create Dashboard Autostart Shortcut
|
|
$WshShell = New-Object -ComObject WScript.Shell
|
|
$StartupFolder = [Environment]::GetFolderPath('Startup')
|
|
$ShortcutPath = Join-Path $StartupFolder 'Trading Bot Dashboard.lnk'
|
|
$TargetPath = Join-Path $PSScriptRoot 'start_dashboard_silent.bat'
|
|
$WorkingDir = $PSScriptRoot
|
|
|
|
Write-Host ""
|
|
Write-Host "========================================"
|
|
Write-Host " Dashboard Autostart Installation"
|
|
Write-Host "========================================"
|
|
Write-Host ""
|
|
|
|
# Check if already exists
|
|
if (Test-Path $ShortcutPath) {
|
|
Write-Host "[INFO] Autostart bereits installiert!"
|
|
Write-Host "[INFO] Ersetze vorhandene Verknüpfung..."
|
|
Remove-Item $ShortcutPath -Force
|
|
}
|
|
|
|
# Create shortcut
|
|
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
|
|
$Shortcut.TargetPath = $TargetPath
|
|
$Shortcut.WorkingDirectory = $WorkingDir
|
|
$Shortcut.Description = "Trading Bot Dashboard - Autostart"
|
|
$Shortcut.Save()
|
|
|
|
Write-Host "[OK] Autostart erfolgreich installiert!"
|
|
Write-Host ""
|
|
Write-Host "Verknüpfung:"
|
|
Write-Host " $ShortcutPath"
|
|
Write-Host ""
|
|
Write-Host "Ziel:"
|
|
Write-Host " $TargetPath"
|
|
Write-Host ""
|
|
Write-Host "[INFO] Dashboard startet ab nächstem Login automatisch"
|
|
Write-Host "[INFO] URL: http://localhost:8501"
|
|
Write-Host ""
|