if (subKey2.equals(key)) {
String tapName = Advapi32Util.registryGetStringValue(root, topKey + "\\" + subKey + "\\" + key, value);
if (tapName != null) {
+ EMLogger.getLogger().warning("tapname added: " + tapName);
tapNameList.add(tapName);
}
}
}
}
}
-
- topKey = "SYSTEM\\CurrentControlSet\\services\\Bridge\\Linkage";
+ EMLogger.getLogger().warning("found tapid: " + foundTapId);
+ if (System.getProperty("os.name").startsWith("Windows 8")) {
+ topKey = "SYSTEM\\CurrentControlSet\\services\\NdisImPlatform\\Linkage";
+ } else {
+ topKey = "SYSTEM\\CurrentControlSet\\services\\Bridge\\Linkage";
+ }
value = "Route";
String valueArr[] = Advapi32Util.registryGetStringArray(root, topKey, value);
for (String str : valueArr) {
}
} catch (Win32Exception e) {
-
+ EMLogger.getLogger().warning("Failed to check if tap exists in bridge or not" + e.getMessage());
} finally {
if (regKey != null) {
Advapi32Util.registryCloseKey(regKey.getValue());
bridgeId = arr[arr.length - 1];
}
} catch (Win32Exception e) {
-
+ EMLogger.getLogger().warning("Failed to getBridgeId(): " + e.getMessage());
}
}
return bridgeId;