src/jdk.packager/windows/classes/jdk/packager/internal/windows/WindowsRegistry.java
equal
deleted
inserted
replaced
45 * @return true if DisableRealtimeMonitoring is set to 0x1, |
45 * @return true if DisableRealtimeMonitoring is set to 0x1, |
46 * false otherwise. |
46 * false otherwise. |
47 */ |
47 */ |
48 public static final boolean readDisableRealtimeMonitoring() { |
48 public static final boolean readDisableRealtimeMonitoring() { |
49 boolean result = false; |
49 boolean result = false; |
50 final String key = |
50 final String key = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\" |
51 "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows Defender\\Real-Time Protection"; |
51 + "Windows Defender\\Real-Time Protection"; |
52 final String subkey = "DisableRealtimeMonitoring"; |
52 final String subkey = "DisableRealtimeMonitoring"; |
53 String value = readRegistry(key, subkey); |
53 String value = readRegistry(key, subkey); |
54 |
54 |
55 if (!value.isEmpty()) { |
55 if (!value.isEmpty()) { |
56 // This code could be written better but this works. It validates |
56 // This code could be written better but this works. It validates |
75 return result; |
75 return result; |
76 } |
76 } |
77 |
77 |
78 public static final List<String> readExclusionsPaths() { |
78 public static final List<String> readExclusionsPaths() { |
79 List<String> result = new ArrayList(); |
79 List<String> result = new ArrayList(); |
80 final String key = |
80 final String key = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\" |
81 "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows Defender\\Exclusions\\Paths"; |
81 + "Windows Defender\\Exclusions\\Paths"; |
82 String value = readRegistry(key, ""); |
82 String value = readRegistry(key, ""); |
83 |
83 |
84 if (!value.isEmpty()) { |
84 if (!value.isEmpty()) { |
85 final String reg = "REG_DWORD"; |
85 final String reg = "REG_DWORD"; |
86 final String hex = "0x0"; |
86 final String hex = "0x0"; |