|
| 1 | +--- |
| 2 | +sidebar_position: 6 |
| 3 | +--- |
| 4 | + |
| 5 | +# System-Wide Policies |
| 6 | + |
| 7 | +System-wide policies allow administrators to enforce specific settings for all users on a machine. These policies override user-specific settings and provide centralized control over application behavior in enterprise environments. |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +Policies are defined in a `config.json` file placed in the application installation directory (the same folder as `NETworkManager.exe`). When this file exists, the application loads the policies at startup and applies them with precedence over user settings. |
| 12 | + |
| 13 | +Users will see a visual indicator in the Settings UI when a setting is controlled by a system-wide policy, showing them the administrator-enforced value and preventing them from changing it. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## Configuration File |
| 18 | + |
| 19 | +The `config.json` file uses a simple JSON structure to define policy values. An example file (`config.json.example`) is included in the application installation directory for reference. |
| 20 | + |
| 21 | +**File Location:** |
| 22 | +- **Installed version**: `C:\Program Files\NETworkManager\config.json` (or your custom installation path) |
| 23 | +- **Portable version**: Same directory as `NETworkManager.exe` |
| 24 | + |
| 25 | +**File Format:** |
| 26 | + |
| 27 | +```json |
| 28 | +{ |
| 29 | + "Update_CheckForUpdatesAtStartup": false |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +:::note |
| 34 | + |
| 35 | +- The file must be named exactly `config.json` (case-sensitive) |
| 36 | +- The file must contain valid JSON syntax |
| 37 | +- Changes to the file require restarting the application to take effect |
| 38 | +- If the file doesn't exist or contains invalid JSON, it will be ignored and user settings will apply |
| 39 | + |
| 40 | +::: |
| 41 | + |
| 42 | +## Available Policies |
| 43 | + |
| 44 | +### Update_CheckForUpdatesAtStartup |
| 45 | + |
| 46 | +Controls whether the application checks for updates at startup for all users. |
| 47 | + |
| 48 | +**Type:** `Boolean` (true/false) |
| 49 | + |
| 50 | +**Default:** Not set (users control this setting) |
| 51 | + |
| 52 | +**Values:** |
| 53 | +- `true` - Force enable automatic update checks at startup for all users |
| 54 | +- `false` - Force disable automatic update checks at startup for all users |
| 55 | +- Omit the property - Allow users to control this setting themselves |
| 56 | + |
| 57 | +**Example (disable updates):** |
| 58 | + |
| 59 | +```json |
| 60 | +{ |
| 61 | + "Update_CheckForUpdatesAtStartup": false |
| 62 | +} |
| 63 | +``` |
| 64 | + |
| 65 | +**Example (enable updates):** |
| 66 | + |
| 67 | +```json |
| 68 | +{ |
| 69 | + "Update_CheckForUpdatesAtStartup": true |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +:::tip Use Case |
| 74 | + |
| 75 | +This is particularly useful for enterprise deployments where you want to: |
| 76 | +- Ensure consistent update check behavior across all users |
| 77 | +- Prevent users from being prompted about updates when you manage updates centrally |
| 78 | +- Enforce update checks to ensure users are notified of important security updates |
| 79 | + |
| 80 | +::: |
| 81 | + |
| 82 | +## User Experience |
| 83 | + |
| 84 | +When a setting is controlled by a system-wide policy: |
| 85 | + |
| 86 | +1. **Settings UI**: The toggle/control for the setting is disabled |
| 87 | +2. **Visual Indicator**: An orange shield icon appears next to the setting |
| 88 | +3. **Administrator Message**: The text "This setting is managed by your administrator" is displayed |
| 89 | +4. **Value Display**: The UI shows the value set by the administrator (enabled or disabled) |
| 90 | + |
| 91 | +This provides clear feedback to users about which settings are under administrative control and what values are being enforced. |
| 92 | + |
| 93 | +## Deployment |
| 94 | + |
| 95 | +For enterprise deployments: |
| 96 | + |
| 97 | +1. **Create the configuration file**: |
| 98 | + - Use the `config.json.example` as a template |
| 99 | + - Rename it to `config.json` |
| 100 | + - Set your desired policy values |
| 101 | + |
| 102 | +2. **Deploy to installation directory**: |
| 103 | + - Place the `config.json` file in the same directory as `NETworkManager.exe` |
| 104 | + - For MSI installations, this is typically `C:\Program Files\NETworkManager\` |
| 105 | + - For portable installations, place it next to the executable |
| 106 | + |
| 107 | +3. **Deploy methods**: |
| 108 | + - Group Policy (copy file to installation directory) |
| 109 | + - Configuration management tools (Ansible, SCCM, etc.) |
| 110 | + - MSI deployment scripts |
| 111 | + - Manual deployment for small-scale rollouts |
| 112 | + |
| 113 | +4. **Verification**: |
| 114 | + - Launch the application |
| 115 | + - Navigate to Settings > Update |
| 116 | + - Verify the shield icon and administrator message appear |
| 117 | + - Confirm the toggle reflects the policy value and is disabled |
| 118 | + |
| 119 | +:::warning |
| 120 | + |
| 121 | +Ensure the `config.json` file has appropriate permissions so that regular users cannot modify it. On standard installations in `Program Files`, this is automatically enforced by Windows file permissions. |
| 122 | + |
| 123 | +::: |
| 124 | + |
| 125 | +## Troubleshooting |
| 126 | + |
| 127 | +**Policy not being applied:** |
| 128 | +- Verify the file is named exactly `config.json` (not `config.json.txt`) |
| 129 | +- Check that the JSON syntax is valid (use a JSON validator) |
| 130 | +- Confirm the file is in the correct directory (same as `NETworkManager.exe`) |
| 131 | +- Restart the application after creating or modifying the file |
| 132 | +- Check the application logs for any error messages related to policy loading |
| 133 | + |
| 134 | +**Policy values not showing in UI:** |
| 135 | +- Ensure the property name matches exactly: `Update_CheckForUpdatesAtStartup` |
| 136 | +- Verify the value is a boolean (`true` or `false`), not a string (`"true"` or `"false"`) |
| 137 | +- Check that there are no syntax errors in the JSON file |
| 138 | + |
| 139 | +## Future Policies |
| 140 | + |
| 141 | +Additional policy options will be added in future releases to provide more granular control over application behavior. If you have specific requirements for system-wide policies in your organization, please submit a feature request via the [GitHub issue tracker](https://github.com/BornToBeRoot/NETworkManager/issues/new/choose). |
0 commit comments