Registry Key Script

Here is a script to enable the display of file extensions in Windows Explorer by modifying the registry:

cmdCopier le code:: Show file extensions in Explorer
reg load HKLM
cmdCopier le code:: Show file extensions in Explorer
reg load HKLM\0000 c:\users\default\ntuser.dat
reg add "HKLM\0000\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
reg unload HKLM\0000
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
%windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
00 c:\users\default\ntuser.dat reg add "HKLM
cmdCopier le code:: Show file extensions in Explorer
reg load HKLM\0000 c:\users\default\ntuser.dat
reg add "HKLM\0000\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
reg unload HKLM\0000
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
%windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
00\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0 reg unload HKLM
cmdCopier le code:: Show file extensions in Explorer
reg load HKLM\0000 c:\users\default\ntuser.dat
reg add "HKLM\0000\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
reg unload HKLM\0000
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0
%windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
00 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0 %windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

Using the Script

  1. Create the script:
    • Copy the above script into a file named ShowFileExtensions.cmd.
  2. Run the script:
    • Open Command Prompt with administrative rights.
    • Navigate to the directory where the script is saved.
    • Execute the script:cmdCopier le code.\ShowFileExtensions.cmd
  3. Verification:
    • Open Windows Explorer and navigate to a folder with files.
    • Verify that file extensions are now visible.

Explanation of the Script

  • Loading the registry hive:cmdCopier le codereg load HKLM\0000 c:\users\default\ntuser.dat This loads the default user hive so that changes can be made for new user profiles.
  • Modifying the registry key to show file extensions:cmdCopier le codereg add "HKLM\0000\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /f /D 0 These commands set the HideFileExt value to 0 in both the default user hive and the current user hive.
  • Unloading the registry hive:cmdCopier le codereg unload HKLM\0000 This unloads the default user hive after making the changes.
  • Updating system parameters:cmdCopier le code%windir%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters This command applies the changes without needing to log off or restart the computer.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.