Last active
August 17, 2023 20:20
-
-
Save guillaC/39fdb8ae6cacce30d248d297a1204674 to your computer and use it in GitHub Desktop.
This PowerShell script explores CLSID registry keys in "HKLM:\SOFTWARE\Classes\CLSID", creating directories based on these values. Directories are within a "folders" subfolder, named "CLSID.CLSID".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$registryPath = "HKLM:\SOFTWARE\Classes\CLSID" | |
$clsidKeys = Get-ChildItem -Path $registryPath | |
foreach ($clsidKey in $clsidKeys) { | |
$name = $clsidKey.PSChildName | |
$directoryPath = ".\folders\$name.$name" | |
if (-not (Test-Path -Path $directoryPath)) { | |
New-Item -Path $directoryPath -ItemType Directory | |
Write-Host "créé : $directoryPath" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The provided PowerShell script iterates the CLSID registry keys under "HKLM:\SOFTWARE\Classes\CLSID" and creates directories based on the CLSID values.
Each directory is created in a subfolder called "folders" with a name in the format "CLSID.CLSID". The purpose of this script is to reveal and highlight the list of "hidden" directories on Windows that correspond to CLSID entries in the registry. If a directory with the specific CLSID name doesn't exist, the script creates it and outputs a message indicating its creation.
See Also : https://www.youtube.com/watch?v=BVXxcbX0biM