Package KB5002623

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Answer
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 10, 2025 - 4:15 PM

Good morning,

For the problem related to KB5002700 in Office 2016, Microsoft indicates to use the binary here: https://www.microsoft.com/en-us/downloa ... ?id=108113

Here is a package code to manage 32-bit and 64-bit Office:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
# Info : https://www.microsoft.com/en-us/download/details.aspx?id=108113

#Outlook uninstallkey :
#32 bits
#{90160000-0012-0000-0000-0000000FF1CE}
#64 bits                                
#{90160000-0012-0000-1000-0000000FF1CE}

def install():
    # Declaring local variables
    office_version = installed_softwares("Office")

    # Installing the software

    for key in office_version:
        if ("90160000-0012-0000-1000-0000000FF1CE" in key["uninstall_string"]):
            print("Installing")
            install_exe_if_needed('msodll202016-kb5002623-fullfile-x64-glb.exe',
                silentflags='/quiet',
                key='',
                min_version='16.0.5495.1002'
            )
            break
        elif ("{90160000-0012-0000-0000-0000000FF1CE}" in key["uninstall_string"]):
            print("Installing")
            install_exe_if_needed('msodll202016-kb5002623-fullfile-x86-glb.exe',
                silentflags='/quiet',
                key='',
                min_version='16.0.5495.1002'
            )
            break
        else:
            print("Office version is not 2016 version")


esberard
Messages: 36
Registration: Oct 09, 2023 - 11:35

April 10, 2025 - 6:07 PM

We manage with this package as a dependency of our Office 2016 package:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    # Retrait kb KB5002700 Office avril 2025
    if WAPT.installed('unistra-ms-office2016'):
        if installed_softwares('02350708-7ECD-44B8-A8D0-62BEBB7B5847') and not installed_softwares('FCD65F48-B92B-4238-818C-72FC256E8E23'):
            print("KB5002700 installée sans kb5002623 : application du correctif")
            run_notfatal('msodll202016-kb5002623-fullfile-x86-glb.exe /quiet /norestart')
        elif installed_softwares('FCD65F48-B92B-4238-818C-72FC256E8E23'):
            print('Correctif kb5002623 déjà appliqué')
        else:
            print('KB5002700 manquante')
    else:
        print("Office 2016 n'est pas installé. Non géré")

def audit():
    retour = 'OK'
    if WAPT.installed('unistra-ms-office2016'):
        if installed_softwares('02350708-7ECD-44B8-A8D0-62BEBB7B5847') and not installed_softwares('FCD65F48-B92B-4238-818C-72FC256E8E23'):
            print("ERREUR : le correctif n'est pas actif\nRéinstallation du paquet")
            retour = 'ERROR'
            WAPT.install(control.package, force=True)

    return retour
User avatar
Gaetan
Messages: 169
Registration: August 8, 2019 - 10:16
Location: Toulouse

April 11, 2025 - 11:46

A small correction for those who already have the KB:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
# Info : https://www.microsoft.com/en-us/download/details.aspx?id=108113

# Outlook uninstallkey :
# 32 bits
# {90160000-0012-0000-0000-0000000FF1CE}
# 64 bits
# {90160000-0012-0000-1000-0000000FF1CE}


def install():
    # Declaring local variables
    office_version = installed_softwares("Office")
    kb_installed = installed_softwares("kb5002623")

    # Installing the software

    if not kb_installed:

        for key in office_version:
            if "90160000-0012-0000-1000-0000000FF1CE" in key["uninstall_string"]:
                print("Installing")
                install_exe_if_needed(
                    "msodll202016-kb5002623-fullfile-x64-glb.exe",
                    silentflags="/quiet",
                    key="{90160000-0012-0000-1000-0000000FF1CE}_Office16.STANDARD_{15F938CC-D683-433E-B300-C3B15EC3F6DB}",
                    min_version="16.0.5495.1002",
                )
                break
            elif "{90160000-0012-0000-0000-0000000FF1CE}" in key["uninstall_string"]:
                print("Installing")
                install_exe_if_needed(
                    "msodll202016-kb5002623-fullfile-x86-glb.exe",
                    silentflags="/quiet",
                    key="{90160000-0012-0000-0000-0000000FF1CE}_Office16.STANDARD_{FCD65F48-B92B-4238-818C-72FC256E8E23}",
                    min_version="16.0.5495.1002",
                )
                break
            else:
                print("Office version is not 2016 version")
    else:
        print("kb5002623 Already installed")
Answer