mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 02:00:45 +08:00
Release 0.4.13: elevate all end-user entry points for Program Files installs.
CMD and packaging scripts self-elevate via UAC; fix RunAs/WindowStyle clash; logon tray uses Highest scheduled task. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ee053f9990
commit
afa8e06b2d
20 changed files with 193 additions and 50 deletions
|
|
@ -1,9 +1,14 @@
|
|||
@echo off
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
net session >nul 2>&1
|
||||
if not "%errorLevel%"=="0" (
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "try { $p = Start-Process -FilePath '%~f0' -Verb RunAs -Wait -PassThru; if ($null -eq $p -or $null -eq $p.ExitCode) { exit 1 }; exit $p.ExitCode } catch { exit 1 }"
|
||||
exit /b !ERRORLEVEL!
|
||||
)
|
||||
set "ROOT=%~dp0"
|
||||
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
|
||||
cd /d "%ROOT%"
|
||||
title NetX — Reconfigure database
|
||||
title NetX - Reconfigure database
|
||||
echo.
|
||||
echo NetX database reconfigure / 重新配置数据库
|
||||
echo Prefer the installer wizard for first-time setup.
|
||||
|
|
@ -12,12 +17,12 @@ 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" (
|
||||
set "EC=!ERRORLEVEL!"
|
||||
if not "!EC!"=="0" (
|
||||
echo.
|
||||
echo Setup failed / 配置失败 exit=%EC%
|
||||
echo Setup failed / 配置失败 exit=!EC!
|
||||
pause
|
||||
exit /b %EC%
|
||||
exit /b !EC!
|
||||
)
|
||||
echo.
|
||||
echo Starting NetX tray... / 正在启动托盘...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue