Idea ID: 2786915

Update ZCM Agent Update or Bundle execution on shutdown

Status : Under Consideration
Under Consideration
See status update history
over 5 years ago
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.

Labels:

Install & Upgrade
Parents
  • 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
    \HKEY_LOCAL_MACHINE\SOFTWARE\Novell\ZCM
    Version
    String Type
    <>
    20.1.0.343
    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 REM ECHO SET REM SET ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" GOTO EXTRACT IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" GOTO EXTRACT EXIT :EXTRACT ECHO START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64" START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64" ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" GOTO INSTALL IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" GOTO INSTALL EXIT :INSTALL ECHO INSTALL ECHO START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" :SCHLEIFE ECHO TIMEOUT /T 1 TIMEOUT /T 1 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\20.1.0.343 windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" ECHO TIMEOUT /T 1 TIMEOUT /T 1 EXIT

     

    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

Comment
  • 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
    \HKEY_LOCAL_MACHINE\SOFTWARE\Novell\ZCM
    Version
    String Type
    <>
    20.1.0.343
    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 REM ECHO SET REM SET ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" GOTO EXTRACT IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" GOTO EXTRACT EXIT :EXTRACT ECHO START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64" START "ZENworksaktualisierung" /MIN /WAIT "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" -n -d "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64" ECHO IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" GOTO INSTALL IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" GOTO INSTALL EXIT :INSTALL ECHO INSTALL ECHO START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" START "" /MIN /B "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64\StandaloneUpdater.exe" :SCHLEIFE ECHO TIMEOUT /T 1 TIMEOUT /T 1 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\20.1.0.343 windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" IF EXIST "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" DEL "%_System-Service-Depot%\Novell\ZENworks-Agent\x86_64\20.1.0.343 windows 64.exe" ECHO TIMEOUT /T 1 TIMEOUT /T 1 EXIT

     

    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

Children
No Data