Set Desktop Icon Spacing for All Users in Regedit
This guide explains how Windows administrators can configure custom
horizontal and vertical desktop icon spacing for all interactive
accounts using the Windows Registry Editor (Regedit). By modifying the
IconSpacing and IconVerticalSpacing values
across the default profile and active user hives, administrators can
ensure a uniform desktop layout for both existing and newly created user
accounts.
Understanding Desktop Icon Spacing Values
Desktop icon spacing is controlled by two string values located in
the Control Panel\Desktop\WindowMetrics registry key:
- IconSpacing: Controls horizontal spacing between desktop icons.
- IconVerticalSpacing: Controls vertical spacing between desktop icons.
The values are calculated in twips using negative integers. The
standard default value is -1125. The valid range extends
from -480 (minimum spacing) to -2730 (maximum
spacing). The formula to determine twips from pixels is:
\[\text{Value} = \text{Pixels} \times -15\]
Step 1: Configure Settings for New User Accounts
To apply icon spacing to all future interactive user profiles, modify the Default User profile template.
Press
Win + R, typeregedit, and press Enter to open the Registry Editor with administrative privileges.Select the
HKEY_USERSkey in the left pane.Click File > Load Hive… in the top menu.
Navigate to
C:\Users\Default(ensure hidden files are visible) and selectNTUSER.DAT.Name the loaded key
DefaultUser.Navigate to:
HKEY_USERS\DefaultUser\Control Panel\Desktop\WindowMetricsDouble-click IconSpacing and enter your desired custom value (e.g.,
-1500).Double-click IconVerticalSpacing and enter your desired custom value (e.g.,
-1500).Click the
DefaultUserroot key underHKEY_USERS.Click File > Unload Hive… and confirm by clicking Yes.
Step 2: Configure Settings for Existing User Accounts
For users who have already logged into the system, update their
respective hives under HKEY_USERS.
In the Registry Editor, expand
HKEY_USERS.Locate the security identifier (SID) corresponding to each interactive account (avoiding keys ending in
_Classesor built-in system SIDs like.DEFAULT,S-1-5-18,S-1-5-19, orS-1-5-20).For each active user SID, navigate to:
HKEY_USERS\<User-SID>\Control Panel\Desktop\WindowMetricsSet the IconSpacing and IconVerticalSpacing strings to your target values.
Note: For the currently logged-in administrator account, the same
values can be modified directly under
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics.
Step 3: Apply the Changes
Registry changes to icon metrics do not apply instantaneously to active sessions. To enforce the new spacing:
Sign out of the affected user accounts and sign back in, or restart the computer.
Alternatively, restart the Windows Explorer process via Task Manager or Command Prompt:
taskkill /f /im explorer.exe && start explorer.exe