Skip to content

Commit a7f9107

Browse files
committed
Fix on the launch of the systray after installation via packager
1 parent d7cab18 commit a7f9107

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

NSIS_agent_setup/OCS-NG_Windows_Agent_Setup_x64.nsi

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Page custom AskLocalInventory ValidateLocalInventory ""
6363
; View before start page
6464
!insertmacro MUI_PAGE_INSTFILES
6565
; Finshed page
66-
!define MUI_FINISHPAGE_RUN_TEXT "Start OCS Inventory NG Systray Applet"
67-
!define MUI_FINISHPAGE_RUN "$INSTDIR\OcsSystray.exe"
66+
;!define MUI_FINISHPAGE_RUN_TEXT "Start OCS Inventory NG Systray Applet"
67+
;!define MUI_FINISHPAGE_RUN "$INSTDIR\OcsSystray.exe"
6868
!insertmacro MUI_PAGE_FINISH
6969

7070
UninstPage custom un.AskUninstallOptions un.ValidateUninstallOptions ""
@@ -2041,6 +2041,7 @@ Section "Network inventory (server reachable)" SEC04
20412041
; DO NOT LAUNCH SYSTRAY AUTOMATICALLY, to avoid it running under system account
20422042
; when agent is upgraded using agent itself and package deployment
20432043
; Exec "$INSTDIR\OcsSystray.exe"
2044+
ShellExecAsUser::ShellExecAsUser "open" "$INSTDIR\OcsSystray.exe"
20442045
${EndIf}
20452046
; Install service if needed
20462047
Call InstallService

NSIS_agent_setup/OCS-NG_Windows_Agent_Setup_x86.nsi

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Page custom AskLocalInventory ValidateLocalInventory ""
6262
; View before start page
6363
!insertmacro MUI_PAGE_INSTFILES
6464
; Finshed page
65-
!define MUI_FINISHPAGE_RUN_TEXT "Start OCS inventory NG Systray Applet"
66-
!define MUI_FINISHPAGE_RUN "$INSTDIR\OcsSystray.exe"
65+
;!define MUI_FINISHPAGE_RUN_TEXT "Start OCS inventory NG Systray Applet"
66+
;!define MUI_FINISHPAGE_RUN "$INSTDIR\OcsSystray.exe"
6767
!insertmacro MUI_PAGE_FINISH
6868
; Confirl before uninstall
6969
UninstPage custom un.AskUninstallOptions un.ValidateUninstallOptions ""
@@ -1981,6 +1981,7 @@ Section "Network inventory (server reachable)" SEC04
19811981
; DO NOT LAUNCH SYSTRAY AUTOMATICALLY, to avoid it running under system account
19821982
; when agent is upgraded using agent itself and package deployment
19831983
; Exec "$INSTDIR\OcsSystray.exe"
1984+
ShellExecAsUser::ShellExecAsUser "open" "$INSTDIR\OcsSystray.exe"
19841985
${EndIf}
19851986
; Install service if needed
19861987
Call InstallService

NSIS_agent_setup/Readme.txt

+3-7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ REQUIREMENTS
1818
- KillProcDLL plug-in (http://nsis.sourceforge.net/KillProcDLL_plug-in)
1919
- SetACL 2.0.3 or higher (http://setacl.sourceforge.net/)
2020
- NSIS Simple Firewall Plugin 1.19 or higher (http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin)
21+
- ShellExecAsUser plugin (https://nsis.sourceforge.io/ShellExecAsUser_plug-in)
2122

2223
Put SetACL.exe into OCS-NG_Windows_Agent_Setup.nsi script directory, and
2324
compile OCS-NG_Windows_Agent_Setup.nsi (Script assume that agent's binary
@@ -30,7 +31,7 @@ shipped with Visual Studio 2008, does not mention Windows 2000 as a valid build
3031
target, only Windows XP and higher.
3132

3233
So, for Windows 2000 target only, we prefer using a precompiled binary distribution
33-
from G�nter Knauf, built using MingW32 compiler, and available at location
34+
from G�nter Knauf, built using MingW32 compiler, and available at location
3435
http://www.gknw.net/mirror/curl/win32/curl-7.21.3-ssl-sspi-zlib-static-bin-w32.zip
3536
Just download this package and unzip it into nsis_agent_setup folder.
3637

@@ -49,11 +50,6 @@ INSTALLER COMMAND LINE OPTIONS
4950

5051
- /NOSPLASH disable spash screen when installer starts
5152

52-
- /UPGRADE to deploy new agent through OCS deployment feature.
53-
Because you upgrade agent using agent itself to run the upgrade, it is needed
54-
to notify the installer (which terminates agent's processes) to specify the
55-
result in order to send it back to the server next time agent will run
56-
5753
- /NO_SERVICE to not register OCS Inventory NG Agent into Windows Service
5854
Manager. Agent can onlybe launched manually or through a script/GPO.
5955

@@ -82,4 +78,4 @@ parameters (see agent's options for more detail):
8278

8379
We hope it will works for you !
8480

85-
OCS Inventory Team
81+
OCS Inventory Team

0 commit comments

Comments
 (0)