Esempio n. 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()}
Esempio n. 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()}