Tasks #2167

New 'GetFusionInventoryTaskSchedule' function.

Added by Tomás Abad almost 4 years ago. Updated over 3 years ago.

Status:In ProgressStart date:06/19/2013
Priority:NormalDue date:
Assignee:Manuel J. Garrido% Done:

50%

Category:-
Target version:Unplanned yet

Description

Write in '.\FusionInventory Agent\Include\WinTasksFunc.nsh' a new function 'GetFusionInventoryTaskSchedule' to get the Windows Task schedule of the FusionInventory-Agent task, whether it exists.

; GetFusionInventoryTaskSchedule
!define GetFusionInventoryTaskSchedule "!insertmacro GetFusionInventoryTaskSchedule" 

!macro GetFusionInventoryTaskSchedule Frequency Modifier
   Call GetFusionInventoryTaskSchedule
   Pop ${Frequency}
   Pop ${Modifier}
!macroend

Function GetFusionInventoryTaskSchedule
   ...
   ...
FunctionEnd

The error flag should be set if the Windows Task doesn't exist.

Then, change in '.\FusionInventory Agent\Include\MiscFunc.nsh' this

   ${If} ${FusionInventoryAgentTaskIsInstalled}
      ; FusionInventory Agent Windows task installed
      ${WriteINIOption} "$R0" "${IO_EXECMODE}" "${EXECMODE_TASK}" 
   ${EndIf}

to this other

   ${If} ${FusionInventoryAgentTaskIsInstalled}
      ; FusionInventory Agent Windows task installed
      ${WriteINIOption} "$R0" "${IO_EXECMODE}" "${EXECMODE_TASK}" 
      ${GetFusionInventoryTaskSchedule} $R1 $R2
      ${Select} "$R1" 
         ${Case} "${FREQUENCY_MINUTE}" 
            ${WriteINIOption} "$R0" "${IO_TASK-MINUTE-MODIFIER}" "$R2" 
         ${Case} "${FREQUENCY_HOURLY}" 
            ${WriteINIOption} "$R0" "${IO_TASK-HOURLY-MODIFIER}" "$R2" 
         ${Case} "${FREQUENCY_DAILY}" 
            ${WriteINIOption} "$R0" "${IO_TASK-DAILY-MODIFIER}" "$R2" 
      ${EndSelect}
   ${EndIf}

History

#1 Updated by Manuel J. Garrido almost 4 years ago

  • Assignee set to Manuel J. Garrido

#2 Updated by Tomás Abad almost 4 years ago

  • % Done changed from 0 to 50

#3 Updated by Tomás Abad almost 4 years ago

  • Status changed from New to In Progress
  • Target version changed from 2.3.0 to 2.3.1

#4 Updated by Tomás Abad over 3 years ago

  • Target version changed from 2.3.1 to 2.3.2

#5 Updated by Tomás Abad over 3 years ago

  • Target version changed from 2.3.2 to Unplanned yet

Also available in: Atom PDF