Page 1 of 1

(Custom) InitializationHook.cmd / FinalizationHook.cmd

PostPosted: 04.10.2014, 13:44
by wquatan
I wanted to use the Custom FinalizationHook.cmd to process the logfile.
Unfortunately this isn't working as expected, because the InitializationHook.cmd / FinalizationHook.cmd are executed several times when more then one actions are flagged (languages / iso / ...)

It would be great to have also a GlobalInitializationHook.cmd / GlobalFinalizationHook.cmd, which are only executed once during a run. The GlobalInitializationHook.cmd just after setting all global vars, and the GlobalFinalizationHook.cmd just before the "view log" question.

I really hope this will be considered, as this opens opportunities !
As I have created the Custom InitializationHook.cmd / FinalizationHook.cmd files, if needed I can help testing.

Thanks

Re: (Custom) InitializationHook.cmd / FinalizationHook.cmd

PostPosted: 27.10.2014, 11:48
by WSUSUpdateAdmin
Hi.

Sorry for delayed response.

This is not as simple as it looks, because UpdateGenerator.exe launches download runs in separate processes for each target.

But: If you use a custom script for bundled downloads, e.g. for scheduled tasks (see viewtopic.php?f=7&t=120), you may of course call custom GlobalInitializationHook.cmd and GlobalFinalizationHook.cmd scripts inside.

Regards
T. Wittrock

Re: (Custom) InitializationHook.cmd / FinalizationHook.cmd

PostPosted: 27.11.2014, 17:44
by wquatan
Hi,

I understand the problem.

But I think this can be achieved by :

-calling GlobalInitializationHook.cmd in UpdateGenerator.exe before the launch of runs
-calling GlobalFinalizationHook.cmd in UpdateGenerator.exe after the launch of runs

or maybe even easier

-setting a parameter FirstLaunch=TRUE when it's the first launch, otherwise FALSE
-setting a parameter LastLaunch=TRUE when it's the last launch, otherwise FALSE

then these parameters could be used in InitializationHook.cmd / FinalizationHook.cmd