انا لدي كود البايثون ادناه ، اريد اضافة للكود تتمثل بتثبيت صامت لتشغيل حزمة vc_redist ، حيث يقوم بتثبيت 
 صامت للتطبيق الذي اسمه vcruntime140_x64.exe عندما يتم تثبيت (accessRunTime_x64.exe) ويقوم بتثبيت صامت للتطبيق الذي اسمه vcruntime140_x86 عندما يتم تثبيت (accessRunTime_x86.exe) ، علما ان جميع الملفات ومن ضمنها الملفات (vcruntime140_x86 و vcruntime140_x64) هي تقع بنفس المسار لملف الكود بايثون 


import os
import subprocess
import winreg

def get_office_version_and_architecture():
    try:
        # Get the installed Microsoft Office version
        output = subprocess.check_output(['wmic', 'product', 'where', 'name like "Microsoft Office%"', 'get', 'name,version'], text=True)
        office_lines = output.strip().split('\n')[1:]  # Skip the header line
        office_info = [line.strip() for line in office_lines if line.strip()]
        
        if office_info:
            name, version = office_info[0].rsplit(None, 1)
            major_minor_version = '.'.join(version.split('.')[:2])
            
            # Access the registry to get Office architecture
            registry_path = r'SOFTWARE\Microsoft\Office\{}\Outlook'.format(major_minor_version)
            with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, registry_path, 0, winreg.KEY_READ) as key:
                architecture = winreg.QueryValueEx(key, "Bitness")[0]
        else:
            return {'Installed': False}

        return {
            'Installed': True,
            'Version': major_minor_version,
            'Architecture': architecture
        }
    except (subprocess.CalledProcessError, FileNotFoundError, OSError, winreg.error):
        return {'Installed': False}

def install_access_runtime(architecture):
    file_name = f"accessRuntime_{architecture}.exe"
    file_path = os.path.join(os.getcwd(), file_name) if not __file__ else os.path.join(os.path.dirname(__file__), file_name)

    # Determine paths for neighboring files
    dir_path = os.path.dirname(file_path)
    file_to_delete_32 = os.path.join(dir_path, "startProg_Decrytin6_code32.accde")
    file_to_delete_64 = os.path.join(dir_path, "startProg_Decrytin6_code64.accde")
    file_to_rename_32 = os.path.join(dir_path, "startProg_Decrytin6_code32.accde")
    file_to_rename_64 = os.path.join(dir_path, "startProg_Decrytin6_code64.accde")
    target_file_name = os.path.join(dir_path, "startProg_Decrytin6.accde")

    # Delete and rename files based on architecture
    if architecture == 'x64':
        if os.path.exists(file_to_delete_32):
            os.remove(file_to_delete_32)
        if os.path.exists(file_to_rename_64):
            os.rename(file_to_rename_64, target_file_name)
    elif architecture == 'x86':
        if os.path.exists(file_to_delete_64):
            os.remove(file_to_delete_64)
        if os.path.exists(file_to_rename_32):
            os.rename(file_to_rename_32, target_file_name)

    if os.path.exists(file_path):
        # Execute installation
        subprocess.run(f'cmd /c "{file_path} /quiet"', check=True, shell=True)
    else:
        print(f"The installation file was not found at path: {file_path}")

def main():
    office_info = get_office_version_and_architecture()

    if office_info.get('Installed', False):
        print(f"Office Version: {office_info['Version']}")
        print(f"Office Architecture: {office_info['Architecture']}")
        install_access_runtime(office_info['Architecture'])
    else:
        print("Office is not installed. Checking system architecture...")
        system_architecture = "x64" if os.environ["PROCESSOR_ARCHITECTURE"] == "AMD64" else "x86"
        print(f"System Architecture: {system_architecture}")
        install_access_runtime(system_architecture)

if __name__ == "__main__":
    main()