public static boolean setProtection(Path file, boolean activated) {
        boolean ret = false;

        if (!FileUtil.control(file)) {
            return ret;
        }

        if (activated) {
            ret = WindowsFileProtection.resetProtection(file);

        } else {
            ret = WindowsFileProtection.removeProtection(file);
        }

        return ret;
    }