from pathlib import Path


def find_programfiles_dir(child):
    """
    Find a file in Program Files or Program Files (x86)
    """
    pgfiles = Path(r'C:\Program Files'), Path(r'C:\Program Files (x86)')
    candidates = (root / child for root in pgfiles)
    return next(candidate for candidate in candidates if candidate.isdir())