Make BPQ console station-independent with modem detection and Windows installer

This commit is contained in:
alberto committed 2026-10-14 19:43:01 +02:00
1 parent 5a50f0cfdf
commit 3bf26cec13
22 files changed
+285 -133

No files matched your search

+5 -6
View File
@@ -1,6 +1,5 @@
# Eseguire come amministratore solo se il pannello non si apre da altri PC della LAN.
$ErrorActionPreference = 'Stop'
$nodeExe = 'C:\Users\User1\.cache\codex-runtimes\codex-primary-runtime\dependencies\node\bin\node.exe'
if (!(Get-NetFirewallRule -DisplayName 'ALNODE Web Console LAN' -ErrorAction SilentlyContinue)) {
New-NetFirewallRule -DisplayName 'ALNODE Web Console LAN' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8090 -RemoteAddress '192.168.1.0/24' -Program $nodeExe -Profile Any
}
$ErrorActionPreference='Stop'
$config=Get-Content -LiteralPath (Join-Path $PSScriptRoot 'console.config.json') -Raw | ConvertFrom-Json
$nodeExe=if($config.nodeExe -and (Test-Path -LiteralPath $config.nodeExe)){$config.nodeExe}else{(Get-Command node.exe -ErrorAction Stop).Source}
Get-NetFirewallRule -DisplayName 'BPQ Web Console LAN' -ErrorAction SilentlyContinue | Remove-NetFirewallRule
New-NetFirewallRule -DisplayName 'BPQ Web Console LAN' -Direction Inbound -Action Allow -Protocol TCP -LocalPort $config.port -RemoteAddress LocalSubnet -Program $nodeExe -Profile Private | Out-Null