Skip to content

Registry editing

Old Character edited this page Sep 21, 2026 · 2 revisions

Registry editing

Windows uses several registry settings to control how File Explorer displays files.

This project modifies two main areas:

  • Explorer display settings
  • File-type registration entries

HKEY_CLASSES_ROOT

The project primarily uses HKEY_CLASSES_ROOT (HKCR) because it provides the merged view of Windows file association and class registration information.

HKEY_CLASSES_ROOT combines information from:

HKEY_LOCAL_MACHINE\Software\Classes
HKEY_CURRENT_USER\Software\Classes

User-specific entries have priority over machine-wide defaults. Microsoft recommends using HKEY_CURRENT_USER\Software\Classes for per-user changes and HKEY_LOCAL_MACHINE\Software\Classes for machine-wide defaults.

This distinction is important when manually reproducing the changes performed by the script.

Explorer settings

The following key controls the normal Explorer visibility options:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Hidden

Controls the display of hidden files.

The script uses:

1 = Show hidden files
0 = Hide hidden files

HideFileExt

Controls the standard Hide extensions for known file types behavior.

The script uses:

0 = Show extensions
1 = Hide extensions

ShowSuperHidden

Controls the display of files considered super hidden by Windows.

The script uses:

1 = Show super hidden files
0 = Hide super hidden files

The project changes all three values together so that the resulting Explorer configuration is consistent.

File type classes

Some Windows file types remain hidden even when HideFileExt is set to 0.

These cases are controlled by values such as:

NeverShowExt
AlwaysShowExt

For example:

HKEY_CLASSES_ROOT\lnkfile

is the registry class associated with Windows .lnk shortcuts.

Windows historically uses NeverShowExt on this class to prevent Explorer from displaying .lnk. Microsoft documents this behavior directly.

The project therefore changes the class depending on the selected mode.

Show mode

AlwaysShowExt is added and NeverShowExt is removed.

Hide mode

NeverShowExt is added and AlwaysShowExt is removed.

The script applies this operation to every class defined in its extension list.

Explorer refresh

Registry changes are followed by an Explorer restart:

taskkill /im explorer.exe /f
timeout /t 2 /nobreak >nul
start explorer.exe

This forces File Explorer to reload the modified configuration. The project does not require a complete Windows reboot for its normal operation.

Important considerations

Registry modifications should be treated carefully.

Before manually changing registry entries:

  • verify the target key;
  • export the key when appropriate;
  • avoid deleting unrelated values;
  • understand whether the change is per-user or machine-wide.

The fact that a key is visible through HKEY_CLASSES_ROOT does not necessarily mean that it physically exists at that exact location in the registry. HKCR is a merged view of the user and machine class stores.

Manual example

To inspect the .lnk class:

Computer └── HKEY_CLASSES_ROOT └── lnkfile

Typical relevant values are:

NeverShowExt
IsShortcut

The project only changes the extension-visibility behavior and does not rely on modifying IsShortcut.