Update ZCM Agent Update or Bundle execution on shutdown

Idea ID 2786915

Update ZCM Agent Update or Bundle execution on shutdown

It would be very useful to schedule the ZCM-Agent update on System shutdown like Windows Update behavior.
So users work is not disturbed.
It would also be nice to start Bundles when PC is shutdown to perform updates or installations of Software.
Absent Member.
Absent Member.
I just don't get it why software vendors don't see that for many computers, the best time for doing maintainance (like installing updates) is shutdown. In fact even Microsoft has started leaving that path. Up to Windows 7, there was this nice "update and shutdown" button, which was removed in Windows 8.1. What Microsoft never had was to trigger that automatically, a remote shutdown or a shutdown triggered from command line never made that happen. ZENWorks never had that feature as far as I know. Apart from servers and smartphones (and maybe some exceptions like computers in hospitals or something), every computer there is will normally be started and shutdown once a (working) day. And guess what, the only time when there will definitely be no interference with users is during the shutdown process. The user has decided to shut their computer down (or left it unattended thus allowing a remote/automatic shutdown), so it doesn't matter to them if the computer is slow for half an hour, 1 hour or even two hours. In contrast, installation of bundles while a user is logged on will always annoy users unless they're at a very powerful computer which can handle updates with no noticable decrease in speed (and let's be honest, how many computers are there which can fulfil that requirement?). Furthermore, even on a fast machine, a user might still want to start just the bundle which is being updated in the background. Well, bad luck, they have to wait until the install is finished. In contrast, if updates happen during the shutwon process, users prbably won't ever know their admin ever deploys updates, apart maybe from seeing a new version number the next day when they start their updated bundle. Please, Novell, make it happen, it shouldn't even be a major issue to write the code for that.
Absent Member.
Absent Member.
Note that you already can assign a schedule triggering on a user's logout event. Not sure if this will defer an ordered shutdown until a bundle installation / launch has completed, though.
Absent Member.
Absent Member.
No. This won't work. Packages assigned with the event "User Logout" only run on User Logout. Not on shutdown. We've tried already and the documentation describes this behaviour, too. Currently there is no option to install a bundle on shutdown.
There's also no schedule for doing the Agent Update on shutdown - which I find very usefull if it does exist (because of the long time an Agent Update Need).
Absent Member.
Absent Member.
I would love to have an option to apply the agent update during a shutdown, but make it obvious that an update is occurring and to not turn off the computer. My agent updates would not take me a month to roll-out if this was available. Currently, I have to schedule and coordinate with various departments and agencies. Please, please, please implement this feature.
Absent Member.
Absent Member.
We definitely agree. We recently published a cool solution on how to do this with Patch Management policies and we are trying to see if we can somehow productize the approach. The key issue is that MS does not currently provide a supported API, so we are having to get creative. More to come as it comes.
New Member.
We have many mobile users that expect the device to just shutdown.. say when boarding a plane. We would also request an cancel or postpone option for them.
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Under Consideration
Established Member.

I've made a workarround, so that the agent update is going to be installed on computers shutdown.

1. Create a standalone update package.
Source: "Command Line Utilities Reference" (zen_utils.pdf) Page 113
In my case:

zman sucp "ZENworks 2020 Update 1" -n="Windows 64" -p=Windows -a=64


2. Create a bundle which copies the standalone update package to the computers local disk.
Relationships: The Clients
Installation Schedule: Device Boot
Requirements: Registry Key Value
String Type
Install: Copy File(s)
[The standalone update package]

So the standalone update package is being copied to the Computers local disk if the agent version is old.

3. Create a batch file:

@ECHO off
ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" GOTO EXTRACT
IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" GOTO EXTRACT

ECHO START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64"
START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64"
ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64\StandaloneUpdater.exe" GOTO INSTALL

IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64\StandaloneUpdater.exe" GOTO INSTALL

ECHO START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64\StandaloneUpdater.exe"
START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64\StandaloneUpdater.exe"

echo IF NOT EXIST "%ProgramFiles(x86)%\Novell\ZENworks\logs\system-update\5020010000fc50000000002020060300\update_needs_reboot" GOTO SCHLEIFE
IF NOT EXIST "%ProgramFiles(x86)%\Novell\ZENworks\logs\system-update\5020010000fc50000000002020060300\update_needs_reboot" GOTO SCHLEIFE
ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe"
IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\ windows 64.exe"




Now I've configured a Group Policy Object.

  • to extend the wait time for Group Policy scripts
  • to execute the shutdown script visible
  • to start the shutdown script

4. Configure the GPO:

4.1 Computer Configuration\Administrative Templates\System\Scripts\Specify maximum wait time for Group Policy scripts
1800 Seconds (default 600 Seconds)

4.2 Computer Configuration\Administrative Templates\System\Scripts\Display instructions in logoff scripts as they run
Enabled (default not configured > not visible)

4.3 Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Shutdown
Add: enter the name of the batch file
Show files: copy the batch file to the folder

If the tests are successful, the script execution can be made invisible via GPO and / or the output can be designed for the user with other tools.

I hope I haven't forgotten too much.
And sorry for my poor english. 😉

Regards, Chris

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.