mirror of
https://github.com/hansjone/netx.git
synced 2026-10-13 08:30: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
|
|
@ -7,9 +7,11 @@
|
|||
)
|
||||
|
||||
# System-tray controller for NetX (Windows packaged installs).
|
||||
# Always elevated: Start/Stop/Update touch Program Files + services.
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
. "$PSScriptRoot\_common.ps1"
|
||||
Assert-NetxAdminOrRelaunch -ScriptPath $PSCommandPath -BoundParameters $PSBoundParameters -WindowStyle Hidden
|
||||
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
Add-Type -AssemblyName System.Drawing
|
||||
|
|
@ -593,7 +595,7 @@ $miUpdate.add_Click({
|
|||
)
|
||||
try {
|
||||
$ap = Start-Process -FilePath "powershell.exe" -ArgumentList $arg `
|
||||
-WorkingDirectory $prog -WindowStyle Normal -Verb RunAs -PassThru
|
||||
-WorkingDirectory $prog -Verb RunAs -PassThru
|
||||
} catch {
|
||||
$notify.ShowBalloonTip(4000, "NetX", (T "Update cancelled (UAC)." "已取消更新(UAC)。"), [System.Windows.Forms.ToolTipIcon]::Info)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue