26 lines
815 B
Batchfile
26 lines
815 B
Batchfile
@echo off
|
|
REM Windows 로그인 시 JUC500 Tauri 감시 앱 자동 실행
|
|
setlocal EnableExtensions
|
|
cd /d "%~dp0.."
|
|
set "ROOT=%CD%"
|
|
|
|
set "BIN=%ROOT%\juc500-app\src-tauri\target\release\juc500-app.exe"
|
|
if not exist "%BIN%" (
|
|
echo [!] Build first: cd juc500-app ^&^& npm install ^&^& npm run tauri build
|
|
exit /b 1
|
|
)
|
|
|
|
set "STARTUP=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
|
|
set "LINK=%STARTUP%\JUC500.lnk"
|
|
set "LAUNCHER=%ROOT%\scripts\launch_tauri.bat"
|
|
|
|
powershell -NoProfile -Command ^
|
|
"$s=(New-Object -ComObject WScript.Shell).CreateShortcut('%LINK%');" ^
|
|
"$s.TargetPath='%LAUNCHER%';" ^
|
|
"$s.WorkingDirectory='%ROOT%';" ^
|
|
"$s.Description='JUC500 cable auto-launch';" ^
|
|
"$s.Save()"
|
|
|
|
echo Installed startup shortcut: %LINK%
|
|
echo Tray watcher runs at logon; GUI opens when cable is plugged.
|