Skip to content
Snippets Groups Projects
Commit be115a2a authored by edileuton's avatar edileuton
Browse files

windows-installer: Modify to add the netmon.exe in the windows scheduler


Signed-off-by: default avataredileuton <edileuton@gmail.com>
parent 0b5cfd6b
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ Uninstall\${PRODUCT_NAME}" ...@@ -33,6 +33,7 @@ Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM" !define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_UNINST_NAME "Desinstalar ${PRODUCT_NAME}" !define PRODUCT_UNINST_NAME "Desinstalar ${PRODUCT_NAME}"
!define PRODUCT_TASK "$PROGRAMFILES\${PRODUCT_NAME}\bin\agent\datasidAgent.exe" !define PRODUCT_TASK "$PROGRAMFILES\${PRODUCT_NAME}\bin\agent\datasidAgent.exe"
!define NETMON_TASK "$PROGRAMFILES\${PRODUCT_NAME}\bin\agent\netmon.exe"
!define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_FINISHPAGE_NOAUTOCLOSE
SetCompressor bzip2 SetCompressor bzip2
...@@ -115,6 +116,11 @@ Function .onInit ...@@ -115,6 +116,11 @@ Function .onInit
StrCpy $0 "datasidAgent.exe" StrCpy $0 "datasidAgent.exe"
DetailPrint "Killing all processes called '$0'" DetailPrint "Killing all processes called '$0'"
KillProc::KillProcesses KillProc::KillProcesses
;Kill datasidAgent.exe process
StrCpy $0 "netmon.exe"
DetailPrint "Killing all processes called '$0'"
KillProc::KillProcesses
FunctionEnd FunctionEnd
...@@ -133,12 +139,15 @@ Section "SeçãoPrincipal" SEC01 ...@@ -133,12 +139,15 @@ Section "SeçãoPrincipal" SEC01
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "ProxyPass" $ProxyPass WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "ProxyPass" $ProxyPass
${EndIf} ${EndIf}
;Add DatasidAgent task in Windows task scheduler ;Add DatasidAgent task in Windows task scheduler
nsExec::Exec "schtasks /Create /SC HOURLY /MO 1 /TN DatasidAgent \ nsExec::Exec "schtasks /Create /SC HOURLY /MO 1 /TN DatasidAgent \
/TR $\"\$\"${PRODUCT_TASK}$\"\$\" /RU System /F" /TR $\"\$\"${PRODUCT_TASK}$\"\$\" /RU System /F"
;Add net monitoring task in Windows task scheduler
nsExec::Exec "schtasks /Create /SC MINUTE /MO 5 /TN DatasidNetMon \
/TR $\"\$\"${NETMON_TASK}$\"\$\" /RU System /F"
Pop $R2 Pop $R2
File "..\COPYING" File "..\COPYING"
CreateDirectory "$INSTDIR\conf" CreateDirectory "$INSTDIR\conf"
CreateDirectory "$INSTDIR\data" CreateDirectory "$INSTDIR\data"
...@@ -158,6 +167,7 @@ Section "SeçãoPrincipal" SEC01 ...@@ -158,6 +167,7 @@ Section "SeçãoPrincipal" SEC01
File "..\..\windows-collect\src\dist\library.zip" File "..\..\windows-collect\src\dist\library.zip"
;File "..\..\windows-collect\src\dist\powrprof.dll" ;File "..\..\windows-collect\src\dist\powrprof.dll"
File "..\..\windows-collect\src\dist\datasidAgent.exe" File "..\..\windows-collect\src\dist\datasidAgent.exe"
File "..\..\windows-collect\src\netmon\dist\netmon.exe"
File "..\..\windows-collect\src\dist\pyexpat.pyd" File "..\..\windows-collect\src\dist\pyexpat.pyd"
File "..\..\windows-collect\src\dist\python27.dll" File "..\..\windows-collect\src\dist\python27.dll"
File "..\..\windows-collect\src\dist\pythoncom27.dll" File "..\..\windows-collect\src\dist\pythoncom27.dll"
...@@ -176,7 +186,7 @@ Section "SeçãoPrincipal" SEC01 ...@@ -176,7 +186,7 @@ Section "SeçãoPrincipal" SEC01
CopyFiles "$EXEDIR\telecentroInfo" "$INSTDIR\conf" CopyFiles "$EXEDIR\telecentroInfo" "$INSTDIR\conf"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Version" ${PRODUCT_VERSION} WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Version" ${PRODUCT_VERSION}
;Execute DataSID Agent ;Execute DataSID Agent
nsExec::Exec "schtasks /Run /TN DatasidAgent" nsExec::Exec "schtasks /Run /TN DatasidAgent"
SectionEnd SectionEnd
...@@ -256,6 +266,10 @@ Section Uninstall ...@@ -256,6 +266,10 @@ Section Uninstall
;Delete scheduled task ;Delete scheduled task
nsExec::Exec "schtasks /Delete /TN DatasidAgent /F" nsExec::Exec "schtasks /Delete /TN DatasidAgent /F"
Pop $R2 Pop $R2
;Delete scheduled task
nsExec::Exec "schtasks /Delete /TN DatasidNetMon /F"
Pop $R2
SetAutoClose true SetAutoClose true
SectionEnd SectionEnd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment