-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSIMPLE_AUTO_START_SETUP.bat
More file actions
55 lines (48 loc) · 1.53 KB
/
SIMPLE_AUTO_START_SETUP.bat
File metadata and controls
55 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
REM Simple Auto-Start Setup - No Complex Dependencies
cls
echo ============================================================
echo Local Nexus Controller - Simple Auto-Start Setup
echo ============================================================
echo.
echo This will configure Windows to automatically start the
echo controller when you log in.
echo.
echo REQUIRES: Administrator privileges
echo.
pause
cd /d "%~dp0"
REM Create the startup script content
set SCRIPT_PATH=%~dp0tools\auto_start_controller.ps1
echo.
echo Creating Task Scheduler entry...
echo.
REM Create the scheduled task
schtasks /Create /TN "Local Nexus Controller" /TR "powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File \"%SCRIPT_PATH%\"" /SC ONLOGON /RL HIGHEST /F
if errorlevel 1 (
echo.
echo ============================================================
echo ERROR: Failed to create scheduled task
echo ============================================================
echo.
echo Make sure you run this as Administrator.
echo Right-click this file and select "Run as administrator"
echo.
pause
exit /b 1
)
echo.
echo ============================================================
echo SUCCESS! Auto-start configured
echo ============================================================
echo.
echo The controller will now start automatically when you log in.
echo.
echo To test it:
echo 1. Log out and log back in
echo 2. OR run: QUICK_START.bat
echo.
echo To disable:
echo schtasks /Delete /TN "Local Nexus Controller" /F
echo.
pause