Page 1 of 1

Detection method (audit) issue for custom Windows 11 package

Published: January 27, 2025 - 3:08 PM
by fobrien
Good morning,

I am posting this message because I created a custom audit function as part of a Windows 11 upgrade package that I recently created.

Here is my currently used "def audit()" function:

Code: Select all

def audit():

    # Vérification que Windows 11 est bien installé (build 26100)

    check_version=platform.version()
    if check_version=="10.0.26100":
        print(r"OK : Poste correctement migré en Windows 11 %s" % platform.version())
        if os.path.exists("C:\Temp\Win11Drivers"):
            remove_tree(r'C:\Temp\Win11Drivers')
        return "OK"
    else:
        print(r"Problème survenu lors de la migration (voir logs ""setupact.log"" et ""setuperr.log"" dans le répertoire ""C:\Windows\Panther""")
        return "ERROR"
While the audit function works perfectly when tested locally in PyScripter, it's a completely different story in WAPT, which constantly sees Windows 11 as not being installed.

Could it be that deleting a residual directory in my audit function is causing this error?
However, these are files that are outside my package, after reading this excerpt from the WAPT documentation:
With audit, it is not possible to access files contained within the package.
I should point out that in my package, I deliberately did not include the Windows 11 build version to avoid any unpleasant surprises, at the risk of all the workstations in my network massively applying this update.

Thank you in advance for your advice.

Fred