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 HKLMcmdCopier 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 "HKLMcmdCopier 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 HKLMcmdCopier 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
- Create the script:
- Copy the above script into a file named
ShowFileExtensions.cmd
.
- Copy the above script into a file named
- 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
- 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 code
reg 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 code
reg 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 theHideFileExt
value to0
in both the default user hive and the current user hive. - Unloading the registry hive:cmdCopier le code
reg 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