From 5f9cb86ff0a973a00a1ed463ba8cc286c7947a44 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sun, 11 Oct 2026 00:23:31 +0200 Subject: [PATCH] Package only imported DLLs and log firewall command output --- tools/chatgui/installer/vibechat.iss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/chatgui/installer/vibechat.iss b/tools/chatgui/installer/vibechat.iss index 3e80eb95..f3ebc311 100644 --- a/tools/chatgui/installer/vibechat.iss +++ b/tools/chatgui/installer/vibechat.iss @@ -59,10 +59,10 @@ var ResultCode: Integer; begin Parameters := 'advfirewall firewall delete rule name="VibeChat (installer)" program=' + AddQuotes(ExpandConstant('{app}\vibechat.exe')); - if not Exec(ExpandConstant('{sys}\netsh.exe'), Parameters, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + if not ExecAndLogOutput(ExpandConstant('{sys}\netsh.exe'), Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode, nil) then Log(Format('WARNING: cannot run firewall rule removal: error=%d', [ResultCode])) else if ResultCode <> 0 then - Log(Format('Firewall removal: rule absent or removal failed, exit=%d', [ResultCode])) + Log(Format('WARNING: firewall rule removal returned exit=%d; see netsh output above', [ResultCode])) else Log('Firewall: previous VibeChat rule removed'); end; @@ -78,7 +78,7 @@ begin RemoveFirewallRule; Parameters := 'advfirewall firewall add rule name="VibeChat (installer)" dir=in action=allow program=' + AddQuotes(ExpandConstant('{app}\vibechat.exe')) + ' enable=yes profile=any'; - if not Exec(ExpandConstant('{sys}\netsh.exe'), Parameters, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin + if not ExecAndLogOutput(ExpandConstant('{sys}\netsh.exe'), Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode, nil) then begin Log(Format('ERROR: cannot run firewall rule creation: error=%d', [ResultCode])); RaiseException(CustomMessage('FirewallFailed')); end;