mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 04:13:21 +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,7 +1,12 @@
|
|||
@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%"
|
||||
start "" powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "%ROOT%\packaging\launch_shortcut.ps1" -Action stop -ProgramRoot "%ROOT%" -DataRoot "%ProgramData%\NetX"
|
||||
exit /b 0
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\packaging\launch_shortcut.ps1" -Action stop -ProgramRoot "%ROOT%" -DataRoot "%ProgramData%\NetX"
|
||||
exit /b !ERRORLEVEL!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue