Re-actualización del comando dell

Preguntas sobre paquetes WAPT / Solicitudes y ayuda sobre paquetes WAPT.
Reglas del foro
Reglas del foro de la comunidad
* Soporte en inglés en www.reddit.com/r/wapt
* El soporte de la comunidad en francés está disponible en este foro
* Por favor, anteponga [RESUELTO] al título del tema si está resuelto.
* Por favor, no edite un tema que esté etiquetado como [RESUELTO]. Abra un nuevo tema haciendo referencia al anterior.
* Especifique la versión de WAPT instalada, la versión completa y el número de compilación (2.2.1.11957 / 2.2.2.12337 / etc.), así como la edición Enterprise/Discovery.
* Las versiones 1.8.2 y anteriores ya no son compatibles. Las únicas preguntas aceptadas sobre la versión 1.8.2 están relacionadas con la actualización a una versión compatible (2.1, 2.2, etc.).
* Especifique el sistema operativo del servidor (Linux/Windows) y la versión (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Especifique el sistema operativo de la máquina de administración/creación de paquetes y de la máquina con el agente problemático, si corresponde (Windows 7/10/11/Debian 11/etc.).
* Evite hacer varias preguntas al abrir un tema, ya que podría ser ignorado. Si hay varios temas, ábralos por separado, preferiblemente uno tras otro y no todos a la vez (es decir, no sature el foro con spam).
* Incluya fragmentos de código, capturas de pantalla y otras imágenes directamente en la publicación. Los enlaces a Pastebin, Bitly y otros sitios de terceros serán eliminados sistemáticamente.
* Como en cualquier foro comunitario, el soporte es proporcionado voluntariamente por los miembros. Si necesita soporte comercial, puede comunicarse con el departamento de ventas de Tranquil IT al 02.40.97.57.55.
Respuesta
SeiyaJuego
Mensajes: 13
Inscripciones: 25 de mayo de 2023 - 15:19 horas.

21 de septiembre de 2023 - 09:53

Buen día,

Me gustaría volver a la tema anterior con respecto a este paquete.

Arreglé la función de auditoría; se había producido un pequeño error de sangría. Este error provocó que la auditoría siempre mostrara un mensaje de ADVERTENCIA a pesar de que el servicio estaba instalado correctamente.

Código: Seleccionar todo

def audit():
    audit_status = "OK"
    service_name = "DellClientManagementService"
    service_start_mode = get_service_start_mode(service_name)

    if service_start_mode in ["Disabled", "Manual"]:
        print(f"{service_name} service is stopped and prevents the application from working properly.")
        audit_status = "ERROR"
    elif not service_installed(service_name):
        print(f"{service_name} service does not exist.")
        audit_status = "ERROR"
    else:
        if service_is_running(service_name):
            print(f"{service_name} service is working properly.")
        else:
            print(f"{service_name} service is not running.")
            audit_status = "WARNING" # The indent error was here :D
    return audit_status
Además, he modificado el proceso de instalación. Ahora realiza una comprobación preliminar para garantizar que el equipo sea un modelo Dell antes de proceder con la instalación del software. (Considere si desea conservar este método; el otro también funciona)

Código: Seleccionar todo

def install():
    
    def get_system_manufacturer():
        return registry_readstring(HKEY_LOCAL_MACHINE, "SYSTEM\HardwareConfig\Current", "SystemManufacturer")  # Ex: Dell Inc.    
    
    # Declaring local variables
    bin_name = glob.glob("Dell-Command-Update-Windows-Universal-Application_*.EXE")[0]
    
    if "Dell" not in get_system_manufacturer():
        print(f"WARNING: {control.name} can only be installed on a Dell System! The installation will be ignored.")
        return

    # Installing the software
    print("Installing: %s" % bin_name)
    install_exe_if_needed(
        bin_name,
        silentflags="/s /factoryinstall",
        name="Dell Command | Update",
        min_version=control.get_software_version(),
        timeout=900,
    )

    # Disabling telemetry
    registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\Settings\General", "UserConsentDefault", 0)
    registry_set(HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\CFG", "ShowSetupPopup", 0)
    
    # Download updates (notify when ready)
    # registry_set(
    #     HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\Settings\Schedule", "AutomationMode", "ScanDownloadNotify"
    # )
    # registry_set(
    #     HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\Settings\Schedule", "ScheduleMode", 
    #     "Auto"
    # )

    # Manual updates only
    registry_set(
        HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\Settings\Schedule", "ScheduleMode", 
        "ManualUpdates"
    )

    # Disable notification
    registry_set(
        HKEY_LOCAL_MACHINE, r"SOFTWARE\DELL\UpdateService\Clients\CommandUpdate\Preferences\Settings\Schedule", "DisableNotification", 1
    )
Flavien.

Información general:

Servidor WAPT: Debian 11, versión 2.4.0.14143, Enterprise Edition
Máquina de administración: Windows 11, versión WAPT 2.4.0.14143
Respuesta