Class WindowsDefenderUtil
java.lang.Object
net.mcreator.io.WindowsDefenderUtil
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFolderExclusions(List<File> folders) Adds the given folders to Windows Defender exclusions.static booleanChecks if Windows Defender real-time protection is enabled.
-
Constructor Details
-
WindowsDefenderUtil
public WindowsDefenderUtil()
-
-
Method Details
-
isRealTimeProtectionEnabled
public static boolean isRealTimeProtectionEnabled()Checks if Windows Defender real-time protection is enabled. This does not require elevation.- Returns:
- true if real-time protection is enabled, false if it is disabled, if another antivirus is active, if the status cannot be determined or if not running on Windows
-
addFolderExclusions
Adds the given folders to Windows Defender exclusions. This shows the UAC prompt to the user. The exclusions are verified in the same elevated session, so ADDED is only returned if the folders are really excluded. Folders that are already excluded are left as they are.- Parameters:
folders- Folders to exclude from Windows Defender scanning- Returns:
- Result of the operation, DECLINED if the user declined the UAC prompt
-