Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Registry ► ««« »»»

Show or hide hidden and system files via script on Windows 10, 11, ect.?


Here are the scripts to conveniently show or hide hidden and system files without having to manually navigate through the folder options!

Contents:

1.) ... Values ​​that need to be set for hidden and system files!
2.) ... Script for showing hidden and system files!
3.) ... Script for hiding hidden and system files!
4.) ... Tips, questions and answers on this topic!



To show or hide hidden and system files in Windows using a registry script, you can change two specific registry values:

1.) Values ​​that must be set for hidden and system files!


1. `Hidden`:  Controls the display of hidden files.

- Value 1:  Show hidden files.

- Value 0:  Do not show hidden files.

2. `ShowSuperHidden`:  Controls the display of system files (super-hidden files).

- Value 1:  Show system files.

- Value 0:  Do not show system files.

Registry paths



The relevant registry paths are:

- For hidden files: 
`HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced`

- For system files:
`HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced`

2.) Script to display hidden and system files!





@echo off

set KEY_NAME="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

set VAL_NAME_HIDDEN="Hidden"

set VAL_NAME_SUPERHIDDEN="ShowSuperHidden"

rem Show hidden files

reg add %KEY_NAME% /v %VAL_NAME_HIDDEN% /t REG_DWORD /d 1 /f

rem Show system files

reg add %KEY_NAME% /v %VAL_NAME_SUPERHIDDEN% /t REG_DWORD /d 1 /f

echo Changes made successfully.

pause



3.) Script to hide hidden and system files!







@echo off

set KEY_NAME="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

set VAL_NAME_HIDDEN="Hidden"

set VAL_NAME_SUPERHIDDEN="ShowSuperHidden"

rem Do not show hidden files

reg add %KEY_NAME% /v %VAL_NAME_HIDDEN% /t REG_DWORD /d 2 /f

rem Do not show system files

reg add %KEY_NAME% /v %VAL_NAME_SUPERHIDDEN% /t REG_DWORD /d 0 /f

echo Changes made successfully.

pause



Explanation



- `@echo off`:

Prevents the output of commands in the script.

- `set KEY_NAME=...`:

Defines the variable `KEY_NAME` with the path of the registry key.

- `set VAL_NAME_HIDDEN=...` and `set VAL_NAME_SUPERHIDDEN=...`:

Defines the variables for the registry values.

- `reg add ... /v ... /t REG_DWORD /d ... /f`:

Adds a new value or changes an existing value in the registry.

- `/v` specifies the value name.

- `/t REG_DWORD` specifies the data type.

- `/d` specifies the data to be saved.

- `/f` forces the change without confirmation.



4.) Tips, questions and answers on this topic!

1. Administrative rights!
2. Backup the registry!
3. Check the paths and values!
4. Impact on other users!
5. Restart Explorer!
6. Follow security guidelines!
7. Document the changes!
8. Automation and deployment!
9. Example script with Explorer restart!





1.) Administrative rights!


- Why
: Changing the registry often requires administrative rights.
- What to do
: Make sure you run the script with administrative rights. For example, start the script by right-clicking and selecting "Run as administrator".

2.) Backup the registry!


- Why
: Changing the registry can have unforeseen consequences.
- What to do
: Before making changes, make a backup of the registry or at least of the relevant keys:
reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" backup.reg

This will allow you to undo the changes in case something goes wrong.

3.) Check the paths and values!


- Why
: Incorrect paths or values ​​can lead to unexpected behavior.
- What to do
: Make sure the paths and values ​​are correct. The relevant paths are:
- "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
- Values
:
- For hidden files ("Hidden"):
- "1" to show
- "2" to not show
- For system files ("ShowSuperHidden"):
- "1" to show
- "0" to not show

4.) Impact on other users!


- Why
: Changes in "HKEY_CURRENT_USER" only affect the current user profile.
- What to do
: If you want to make the changes for all users, you have to adapt the script accordingly. Changes in "HKEY_LOCAL_MACHINE" could be applied globally, but the settings in question are mostly relevant in "HKEY_CURRENT_USER".

5.) Restart Explorer!


- Why
: Changes to the registry often take effect only after restarting Windows Explorer.
- What to do
: Add a command to restart Explorer at the end of the script:
taskkill /f /im explorer.exe
start explorer.exe


6.) Follow security guidelines!


- Why
: Showing hidden and system files can pose security risks, especially if inexperienced users have access to system files.
- What to do
: Make sure the change is necessary and communicate the potential risks to all affected users.

7.) Document the changes!


- Why
: Good documentation is essential for tracking and tracing changes.
- What to do
: Document exactly what changes you have made and keep this information for future reference.

8.) Automation and deployment!


- Why
: If the change is to be applied to multiple systems, an automated solution is more efficient.
- What to do
: Use scripts or tools such as Group Policies (GPOs) to centrally manage and distribute the changes.

9.) Example script with Explorer restart!



Show hidden and system files:



@echo off
set KEY_NAME="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

set VAL_NAME_HIDDEN="Hidden"

set VAL_NAME_SUPERHIDDEN="ShowSuperHidden"

rem Show hidden files
reg add %KEY_NAME% /v %VAL_NAME_HIDDEN% /t REG_DWORD /d 1 /f

rem Show system files
reg add %KEY_NAME% /v %VAL_NAME_SUPERHIDDEN% /t REG_DWORD /d 1 /f

rem Restart Explorer
taskkill /f /im explorer.exe
start explorer.exe

echo Changes made successfully.
pause


Hide hidden and system files:



@echo off
set KEY_NAME="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

set VAL_NAME_HIDDEN="Hidden"

set VAL_NAME_SUPERHIDDEN="ShowSuperHidden"

rem Do not show hidden files
reg add %KEY_NAME% /v %VAL_NAME_HIDDEN% /t REG_DWORD /d 2 /f

rem Do not show system files
reg add %KEY_NAME% /v %VAL_NAME_SUPERHIDDEN% /t REG_DWORD /d 0 /f

rem Restart Explorer
taskkill /f /im explorer.exe
start explorer.exe

echo Changes made successfully.

pause


Summary!



Showing or hiding hidden and system files via registry script can be effective, but it is important to keep in mind the points mentioned above to ensure safe and proper execution of the changes.




FAQ 15: Updated on: 13 June 2024 07:19 Windows
Registry

Adjust the size of Windows 11 taskbars via the registry?


These steps allow you to adjust the size of the taskbar in Windows 11 using registry scripts. However, keep in mind that changes in the registry can potentially
Registry

Open, edit, backup and restore registry!  


Experimenting with the settings in the Windows 11, 10, etc. registry makes sense, but a backup in order to be able to restore it is also useful Editing
Registry

Add desktop context menu for Windows security settings!


Add security in the desktop context menu under Windows 11, 10, etc. to enable faster access to the security settings under MS Windows OS 1. Security
Registry

Disabling Airplane Mode Completely on Windows?


If you dont need the flight mode, you can simply deactivate it completely with a small registry intervention, the airplane mode under Windows is permanently
Registry

Environment variables in the Windows 11, 10, ... Registry!


You can easily find, edit or delete the environment variables in the Windows 11, 10, registry Everyone probably knows ►  What the environment variables 
Registry

Save and load registry favorites on Windows!


Saving or transferring preferred registration keys or favorites to another MS Windows Desktop PC or MS Windows Server is very popular 1. Saving the
Registry

Registry entry for write protection on external USB drives!


The registry hack to disable writing to USB drives is very popular to prevent unauthorized people from copying  data to the stick 1. Registry entry

»»

  My question is not there in the FAQ
Asked questions on this answer:
  1. What are the effects of showing system files in Windows 10?
  2. How do I hide system files in Windows 11?
  3. Can I change the display of system files in Windows 11 using the registry?
  4. How do I hide hidden files in Windows 12?
  5. How do I reset the display of hidden files in Windows 11?
  6. How do I restore the default view for hidden files in Windows 11?
  7. How can I show system files in Windows 10 using a script? Which registry values ​​control the display of hidden files in Windows 11?
  8. How do I change the display of hidden files in Windows 11?
  9. What settings do I need to change in Windows 12 to show hidden files?
  10. How can I permanently display hidden files in Windows 11?
  11. How do I change the display of system files in Windows 10?
  12. How can I turn the display of system files on and off in Windows 12?
  13. How do I run a script to change the display of hidden files in Windows 11?
  14. How do I enable hidden files in Windows 12?
  15. How do I undo the display of hidden and system files in Windows 12?
  16. What is the registry path to show hidden files in Windows 12?
  17. Which registry values ​​control hidden files in Windows 10?
  18. Which registry values ​​need to be changed in Windows 11 to display system files?
  19. How do I create a backup of the registry in Windows 12 before making changes?
  20. How do I document changes in the registry in Windows 11?
  21. How do I permanently hide system files in Windows 10?
  22. What security risks are there when displaying system files in Windows 12?
  23. How do I prevent hidden files from being visible in Windows 11?
  24. How can I switch hidden files and system files in Windows 11 using a script?
  25. How can I run a script in Windows 11 as an administrator?
  26. Which registry values ​​do I need to change in Windows 10 to show hidden files?
  27. How can I restart Windows Explorer in Windows 10?
  28. How can I show hidden files in Windows 12?
  29. How do I prevent system files from being displayed in Windows 10?
  30. How do I change the display of hidden files in Windows 10?
  31. How do I customize a script for all users in Windows 10?
  32. How do I export the registry in Windows 12 before making a change?
  33. How do I script to show hidden files in Windows 11?
  34. How do I disable the display of system files in Windows 10?
  35. How do I create a script to show hidden files in Windows 12?
  36. How do I ensure that changes in Windows 12 are applied to all users?
  37. How do I hide hidden files in Windows 10 using the registry?
  38. How do I change the display of hidden files and system files at the same time in Windows 12?
  39. How do I customize a registry script for Windows 12 to hide system files?
  40. Can I automatically change the display of system files in Windows 11? How do I display system files in Windows 12?
  41. What steps are required in Windows 10 to run a script that shows system files?
  42. How do I show hidden and system files in Windows 10?
  43. How do I run a script in Windows 11 to enable hidden files?
  44. How do I prevent hidden files from being shown in Windows 10?
  45. How do I reset the registry settings for system files in Windows 10?
  46. Can I hide system files in Windows 12 without opening the folder options?
  47. How can I hide system files in Windows 11 using a script?
  48. How do I check registry paths in Windows 12?
Keywords: registry, show, hide, hidden, system, files, script, windows, here, scripts, conveniently, without, having, manually, navigate, through, folder, options, contents, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + DesktopImages3D
  + WinPing
  + GetPixelColor
  + StressMyPC
  + DesktopSnowOK
  + Delete.On.Reboot
  + IsMyTouchScreenOK
  + Print.Test.Page.OK
  + OpenCloseDriveEject
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► What is adware? ◄
► WINDOWS SETTING MS SETTINGS HOLOGRAPHIC AUDIO ◄
► What are number formats? ◄
► What is a PS2 printer port? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....