# 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.3" # ============================================================================================================================== # ================================================== 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 = "防止对任务快捷方式进行分组, 这意味着应用程序名称不会添加到快捷方式文件中的任务名称之前" UseAlternativeCategoryNames = "查找任务链接的替代类别名称,以便将其添加到任务名称之前" AllURLProtocols = "创建指向 URL 协议的快捷方式时,例如 'ms-settings://', 包括来自已安装软件的第三方 URL 协议,而不仅仅是 Microsoft 或系统协议" CollectExtraURLProtocolInfo = "收集有关 URL 协议的额外信息,这些信息将进入 CSV 电子表格。 可选,因为它不用于快捷方式,并且需要稍长时间。" KeepPreviousOutputFolders = "在运行脚本之前不删除现有输出文件夹。 如果再次创建,将仍然覆盖任何现有快捷方式。" CollectStatistics = "创建统计文件夹和文件,其中包含有关 shell 文件夹的 CSV 数据 和任务以及其他收集数据的 XML 文件" AllowDuplicateDeepLinks = "允许创建与现有任务链接相同的深度链接。 默认情况下,此类重复项不包括在深度链接文件夹中。" CollectCLSID = "根据 CLSID 创建 shell 文件夹的快捷方式" CollectNamedFolders = "为特殊名称文件夹创建快捷方式" CollectTaskLinks = "为任务链接(shell 文件夹和控制面板菜单中的子页面)创建快捷方式" CollectMSSettings = "为 ms-settings: 链接(系统设置页面)创建快捷方式" CollectDeepLinks = "为深度链接(直接链接到 Windows 各种设置菜单)创建快捷方式" CollectURLProtocols = "为 URL 协议(例如,ms-settings: 等)创建快捷方式" CollectAppxLinks = "为应用程序的隐藏子页面 URL 链接创建快捷方式(例如,ms-clock://pausefocustimer 等) 注意:需要收集 URL 协议链接" DeepScanHiddenLinks = "扫描非 appx 包应用程序的安装目录中的所有文件以查找隐藏链接。 否则只会搜索主要的二进制文件。 注意:这将慢得多。 另请注意:不要与 "深度链接" 混淆。" LoggingLevel = "选择在运行时控制台窗口中显示的详细程度: - 标准:正常日志记录 - 详细:更详细的日志记录 - 调试:最大详细信息,还会创建一些日志文件。" } Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName System.Windows.Forms [xml]$xaml = @" #1E1E1E #CCCCCC #0078D4 #2D2D2D #3F3F3F #FF6B68 #888888 #1b99fa #69d2ff 1 5