예제 #1
0
def get_mapped_drives_dict():
    """Return a dictionary of currently mapped network drives."""
    searcher = framework.ManagementObjectSearcher(
        "root\\CIMV2",
        "SELECT * FROM Win32_MappedLogicalDisk"
        )

    return {x['DeviceID']: x['ProviderName'] for x in searcher.Get()}
예제 #2
0
def get_mapped_drives_dict():
    searcher = framework.ManagementObjectSearcher(
        "root\\CIMV2", "SELECT * FROM Win32_MappedLogicalDisk")

    return {x['DeviceID']: x['ProviderName'] for x in searcher.Get()}