# Get All Shell Folder Shortcuts Script (Aka "Super God Mode") # # Author: ThioJoe # GitHub Repo: https://github.com/ThioJoe/Windows-Super-God-Mode # # This PowerShell script is designed to find and create shortcuts for all special shell folders in Windows. # These folders can be identified through their unique Class Identifiers (CLSIDs) or by their names. # The script also generates CSV files listing these folders and associated tasks/links. # How to Use: # 1. Open PowerShell and navigate to the path containing this script using the 'cd' command. # 2. Run the following command to allow running scripts for the current session: # Set-ExecutionPolicy -ExecutionPolicy unrestricted -Scope Process # 3. Without closing the PowerShell window, run the script by typing the name of the script file starting with .\ for example: # .\Super_God_Mode.ps1 # 4. Wait for it to finish, then check the "Super God Mode" folder for the generated shortcuts. # ====================================================================================================== # =================================== ARGUMENTS (ALL ARE OPTIONAL) =================================== # ====================================================================================================== # # --------------------------------- Alternative Options Arguments ---------------------------------- # # -DontGroupTasks # • Switch (Takes no values) # Prevent grouping task shortcuts, meaning the application name won't be prepended to the task name in the shortcut file # # -UseAlternativeCategoryNames # • Switch (Takes no values) # Looks up alternative category names for task links to prepend to the task names # # -AllURLProtocols # • Switch (Takes no values) # Include third party URL protocols from installed software in the URL Protocols section. By default, only protocols detected to be from Microsoft or system protocols are included. # # -DeepScanHiddenLinks # • Switch (Takes no values) # Scans all files in the installation directory of non-appx-package apps for hidden links. Otherwise, only the primary binary file will be searched. Note: This will be MUCH slower. # # -CollectExtraURLProtocolInfo # • Switch (Takes no values) # Collects extra information about URL protocols that goes into the CSV spreadsheet. Optional because it is not used in the shortcuts and takes slightly longer. # # -AllowDuplicateDeepLinks # • Switch (Takes no values) # Allow the creation of Deep Links that are the same as an existing Task Link. By default, such duplicates are not included in the Deep Links folder. # # ------------------------------------------ Control Output ------------------------------------------ # # -Output # • String Type # Specify a custom output folder path (relative or absolute) to save the generated shortcuts. If not provided, a folder named "Super God Mode" will be created in the script's directory. # # -KeepPreviousOutputFolders # • Switch (Takes no values) # Doesn't delete existing output folders before running the script. Any existing shortcuts will still be overwritten if being created again. # # ------------------------------- Arguments to Limit Outputs ------------------------------- # # -NoStatistics # • Switch (Takes no values) # Skip creating the statistics folder and files containing CSV data about the shell folders and tasks and XML files with other collected data # # -NoReadMe # • Switch (Takes no values) # Skip creating the ReadMe text file in the main folder # # # -SkipCLSID # • Switch (Takes no values) # Skip creating shortcuts for shell folders based on CLSIDs # # -SkipNamedFolders # • Switch (Takes no values) # Skip creating shortcuts for named special folders # # -SkipTaskLinks # • Switch (Takes no values) # Skip creating shortcuts for task links (sub-pages within shell folders and control panel menus) # # -SkipMSSettings # • Switch (Takes no values) # Skip creating shortcuts for ms-settings: links (system settings pages) # # -SkipDeepLinks # • Switch (Takes no values) # Skip creating shortcuts for deep links (direct links to various settings menus across Windows) # # -SkipURLProtocols # • Switch (Takes no values) # Skip creating shortcuts for URL protocols (e.g., mailto:, ms-settings:, etc.) # # -SkipHiddenAppLinks # • Switch (Takes no values) # Skip creating shortcuts for hidden sub-page links for app protocols (e.g., ms-clock://pausefocustimer, etc.) # # -------------------------------------------- Debugging --------------------------------------------- # # -Verbose # • Switch (Takes no values) # Enable verbose output for more detailed information during script execution # # -Debug # • Switch (Takes no values) # Enable debug output for maximum information during script execution. This will also enable verbose output. # # -timing # • Switch (Takes no values) # Enable timing output to show how long each section of the script takes to run. Or timing will be enabled automatically if in verbose or debug mode # # -debugSkipAppxSearch # • Switch (Takes no values) # Skip searching for hidden links in AppX packages. This is useful for debugging and testing searching of third party apps without having to wait for the AppX search to complete. # # -debugSearchOnlyProtocolList # • String Type # Specify a comma-separated list of URL protocols (surrounded by quotes) to search for in the debug mode. This is useful for testing the URL protocol search without having to wait for the full search to complete. # # -uniqueOutputFolder # • Switch (Takes no values) # Append a unique identifier to the output folder name to prevent overwriting existing folders, even if using manual output folder name. Useful to compare different runs without having to manually set a new output folder each time. # # ---------------------------------------- Advanced Arguments ---------------------------------------- # # -NoGUI # • Switch (Takes no values) # Skip the GUI dialog when running the script. If no other arguments are provided, the script will run with default settings. If other arguments are provided, they will be used without the GUI. # # -CustomDLLPath # • String Type # Specify a custom DLL file path to load the shell32.dll content from. If not provided, the default shell32.dll will be used. # NOTE: Because of how Windows works behind the scenes, DLLs reference resources in corresponding .mui and .mun files. # The XML data (resource ID 21) that is required in this script is actually located in shell32.dll.mun, which is located at "C:\Windows\SystemResources\shell32.dll.mun" # This means if you want to reference the data from a DLL that is NOT at C:\Windows\System32\shell32.dll, you should directly reference the .mun file instead. It will auto redirect if it's at that exact path, but not otherwise. # > This is especially important if wanting to reference the data from a different computer, you need to be sure to copy the .mun file # See: https://stackoverflow.com/questions/68389730/windows-dll-function-behaviour-is-different-if-dll-is-moved-to-different-locatio # # -CustomLanguageFolderPath # • String Type # Specify a path to a folder containing language-specific MUI files to use for localized string references, and it will prefer any mui files from there if available instead of the system default. # For example, to use your own language file for shell32.dll, you could specify a path to a folder containing a file named "shell32.dll.mui" in the desired language, and any other such files. # For another example, if you have multiple language packs installed on your system, you could specify the entire language directory in system32 such as "C:\Windows\System32\en-US" to use English strings, or "C:\Windows\System32\de-DE" for German strings. # # -CustomSystemSettingsDLLPath # • String Type # Specify a custom path to the SystemSettings.dll file to load the system settings (ms-settings: links) content from. If not provided, the default SystemSettings.dll will be used. # # -CustomAllSystemSettingsXMLPath # • String Type # Specify a custom path to the AllSystemSettings XML file to load deep links from. If not provided, the default AllSystemSettings XML file will be used. # The default path is "C:\Windows\ImmersiveControlPanel\Settings\AllSystemSettings\ and versions may vary depending on Windows 11 or Windows 10. # # ------------------------------------------------------------------------------------------------------ # # EXAMPLE USAGE FROM COMMAND LINE: # .\Super_God_Mode.ps1 -NoStatistics -CollectExtraURLProtocolInfo -Output "C:\Users\Username\Desktop\My Shortcuts" # # ------------------------------------------------------------------------------------------------------ param( # Alternative Options Arguments [switch]$DontGroupTasks, [switch]$UseAlternativeCategoryNames, [switch]$AllURLProtocols, [switch]$CollectExtraURLProtocolInfo, [switch]$AllowDuplicateDeepLinks, [switch]$DeepScanHiddenLinks, # Control Output [string]$Output, [switch]$KeepPreviousOutputFolders, # Arguments to Limit Outputs [switch]$NoStatistics, [switch]$NoReadMe, [switch]$SkipCLSID, [switch]$SkipNamedFolders, [switch]$SkipTaskLinks, [switch]$SkipMSSettings, [switch]$SkipDeepLinks, [switch]$SkipURLProtocols, [switch]$SkipHiddenAppLinks, # Debugging [switch]$Verbose, [switch]$Debug, [switch]$timing, [switch]$debugSkipAppxSearch, [string]$debugSearchOnlyProtocolList, [switch]$uniqueOutputFolder, # Advanced Arguments [switch]$NoGUI, [string]$CustomDLLPath, [string]$CustomLanguageFolderPath, [string]$CustomSystemSettingsDLLPath, [string]$CustomAllSystemSettingsXMLPath ) # Note: Arguments that are command line only and not used in the GUI: # -NoGUI # -NoReadMe # -CustomDLLPath # -CustomLanguageFolderPath # -CustomSystemSettingsDLLPath # -CustomAllSystemSettingsXMLPath # -debugSkipAppxSearch # -debugSearchOnlyProtocolList # -uniqueOutputFolder $VERSION = "1.2.2" # ============================================================================================================================== # ================================================== GUI FUNCTION ============================================================ # ============================================================================================================================== # Function to show a GUI dialog for selecting script options function Show-SuperGodModeDialog { # Add param for output folder default name param( [string]$defaultOutputFolderName, [switch]$initialDebug, [switch]$initialVerbose ) # Define tooltips here for easy editing $tooltips = @{ # Use for line breaks in the tooltip text DontGroupTasks = "Prevent grouping task shortcuts, meaning the application name won't be prepended to the task name in the shortcut file" UseAlternativeCategoryNames = "Looks up alternative category names for task links to prepend to the task names" AllURLProtocols = "When creating shortcuts to URL protocols like 'ms-settings://', include third party URL protocols from installed software, not just Microsoft or system protocols" CollectExtraURLProtocolInfo = "Collects extra information about URL protocols that goes into the CSV spreadsheet. Optional because it is not used in the shortcuts and takes slightly longer." KeepPreviousOutputFolders = "Doesn't delete existing output folders before running the script. It will still overwrite any existing shortcuts if being created again." CollectStatistics = "Create the statistics folder and files containing CSV data about the shell folders and tasks and XML files with other collected data" AllowDuplicateDeepLinks = "Allow the creation of Deep Links that are the same as an existing Task Link. By default, such duplicates are not included in the Deep Links folder." CollectCLSID = "Create shortcuts for shell folders based on CLSIDs" CollectNamedFolders = "Create shortcuts for named special folders" CollectTaskLinks = "Create shortcuts for task links (sub-pages within shell folders and control panel menus)" CollectMSSettings = "Create shortcuts for ms-settings: links (system settings pages)" CollectDeepLinks = "Create shortcuts for deep links (direct links to various settings menus across Windows)" CollectURLProtocols = "Create shortcuts for URL protocols (e.g., ms-settings:, etc.)" CollectAppxLinks = "Create shortcuts for hidden sub-page URL links for apps (e.g., ms-clock://pausefocustimer, etc.) Note: Requires collecting URL Protocol Links" DeepScanHiddenLinks = "Scans all files in the installation directory of non-appx-package apps for hidden links. Otherwise only the primary binary file will be searched. Note: This wll be MUCH slower. Also Note: Not to be confused with "Deep Links"." LoggingLevel = "Select the level of detail shown in the console window during runtime: - Standard: Normal logging - Verbose: More detailed logging - Debug: Maximum detail, also creates some log files." } Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName System.Windows.Forms [xml]$xaml = @" #1E1E1E #CCCCCC #0078D4 #2D2D2D #3F3F3F #FF6B68 #888888 #1b99fa #69d2ff 1 5