mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
Choose bundled or external PostgreSQL in the Setup wizard with connection validation; optional NETX_CREDENTIAL_SECRET_KEY; single desktop shortcut; faster uninstall and tray startup for offline Windows packages. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
1 KiB
Batchfile
28 lines
1 KiB
Batchfile
@echo off
|
|
setlocal
|
|
set "ROOT=%~dp0"
|
|
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
|
|
cd /d "%ROOT%"
|
|
title NetX — Reconfigure database
|
|
echo.
|
|
echo NetX database reconfigure / 重新配置数据库
|
|
echo Prefer the installer wizard for first-time setup.
|
|
echo 首次安装请用安装向导选择内置或外置数据库。
|
|
echo This window is for repair / reconfigure only.
|
|
echo 本窗口仅用于修复或重新配置。
|
|
echo.
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\packaging\setup_first_run.ps1" -ProgramRoot "%ROOT%" -DataRoot "%ProgramData%\NetX"
|
|
set "EC=%ERRORLEVEL%"
|
|
if not "%EC%"=="0" (
|
|
echo.
|
|
echo Setup failed / 配置失败 exit=%EC%
|
|
pause
|
|
exit /b %EC%
|
|
)
|
|
echo.
|
|
echo Starting NetX tray... / 正在启动托盘...
|
|
start "" powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "%ROOT%\packaging\netx_tray.ps1" -ProgramRoot "%ROOT%" -DataRoot "%ProgramData%\NetX" -StartOnLaunch
|
|
echo.
|
|
echo Done. You can close this window. / 完成,可关闭本窗口。
|
|
pause
|
|
exit /b 0
|