У меня есть сценарий .bat для добавления настраиваемой папки в панель навигации файлового проводника. Я может вижу новое расширение, OneDrive и GDrive из Microsoft Word., а также файловый проводник по умолчанию. Я не могу вижу новое расширение или GDrive из Microsoft Visual Studio, но я может вижу OneDrive и его собственную папку репо.
Так что я думаю, что в программах есть некоторые настройки, которые показывать, зависит от ключей реестра. Так что я надеюсь, что в коде чего-то не хватает. Какие у OneDrive есть. : мышление:
:: Step 1: get the uids from here -> https://www.guidgen.com/
@set CLSID=82ca13c3-a60c-46fa-b805-fca6dc0cd75f
@set apperance_name = ""
@set icon_path = ""
@set folder_path = ""
:: Step 1: Add your CLSID and name your extension
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /ve /t REG_SZ /d %apperance_name% >nul 2>&1
:: Step 2: Set the image for your icon
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\DefaultIcon /f /ve /t REG_EXPAND_SZ /d %icon_path% >nul 2>&1
:: Step 3: Add your extension to the Navigation Pane and make it visible
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /v System.IsPinnedToNamespaceTree /t REG_DWORD /d 0x1 >nul 2>&1
:: Step 4: Set the location for your extension in the Navigation Pane
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /v SortOrderIndex /t REG_DWORD /d 0x42 >nul 2>&1
:: Step 5: Provide the dll that hosts your extension.
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\InProcServer32 /f /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\shell32.dll" >nul 2>&1
:: Step 6: Define the instance object
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance /f /v CLSID /t REG_SZ /d "{0E5AAE11-A475-4c5b-AB00-C66DE400274E}" >nul 2>&1
:: Step 7: Provide the file system attributes of the target folder
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v Attributes /t REG_DWORD /d 0x11 >nul 2>&1
:: Step 8: Set the path for the sync root
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v TargetFolderPath /t REG_EXPAND_SZ /d %folder_path% >nul 2>&1
:: Step 9: Set appropriate shell flags
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\ShellFolder /f /v FolderValueFlags /t REG_DWORD /d 0x28 >nul 2>&1
:: Step 10: Set the appropriate flags to control your shell behavior
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\ShellFolder /f /v Attributes /t REG_DWORD /d 0xF080004D >nul 2>&1
:: Step 11: Register your extension in the namespace root
@reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{%CLSID%} /f /ve /t REG_SZ /d %apperance_name% >nul 2>&1
:: Step 12: Hide your extension from the Desktop
@reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /f /v {%CLSID%} /t REG_DWORD /d 0x1 >nul 2>&1





Хорошо, разобрался. Это весь код для добавления в простой файловый проводник и для просмотра в файловом проводнике другой программы.
Чтобы увидеть в проводнике файлов программы, вам нужно добавить те же ключи в HKEY_CLASSES_ROOT\WOW6432Node\CLSID this.
Осторожно! Вам необходимо изменить второй путь к значку, потому что эта часть не может видеть папку C:\Windows\..etc.
После этого все готово!
:: Step 1: get the uids from here -> https://www.guidgen.com/
:: HKEY_CURRENT_USER\Software\Classes\CLSID\{82ca13c3-a60c-46fa-b805-fca6dc0cd75f}
:: HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{82ca13c3-a60c-46fa-b805-fca6dc0cd75f}
@set CLSID=82ca13c3-a60c-46fa-b805-fca6dc0cd75f
@set apperance_name = ""
@set icon_path = ""
@set icon_secondpath = ""
@set folder_path = ""
:: Step 1: Add your CLSID and name your extension
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /ve /t REG_SZ /d %apperance_name% >nul 2>&1
:: Step 2: Set the image for your icon
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\DefaultIcon /f /ve /t REG_EXPAND_SZ /d %icon_path% >nul 2>&1
:: Step 3: Add your extension to the Navigation Pane and make it visible
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /v System.IsPinnedToNamespaceTree /t REG_DWORD /d 0x1 >nul 2>&1
:: Step 4: Set the location for your extension in the Navigation Pane
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%} /f /v SortOrderIndex /t REG_DWORD /d 0x42 >nul 2>&1
:: Step 5: Provide the dll that hosts your extension.
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\InProcServer32 /f /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\shell32.dll" >nul 2>&1
:: Step 6: Define the instance object
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance /f /v CLSID /t REG_SZ /d "{0E5AAE11-A475-4c5b-AB00-C66DE400274E}" >nul 2>&1
:: Step 7: Provide the file system attributes of the target folder
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v Attributes /t REG_DWORD /d 0x11 >nul 2>&1
:: Step 8: Set the path for the sync root
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v TargetFolderPath /t REG_EXPAND_SZ /d %folder_path% >nul 2>&1
:: Step 9: Set appropriate shell flags
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\ShellFolder /f /v FolderValueFlags /t REG_DWORD /d 0x28 >nul 2>&1
:: Step 10: Set the appropriate flags to control your shell behavior
@reg add HKEY_CURRENT_USER\Software\Classes\CLSID\{%CLSID%}\ShellFolder /f /v Attributes /t REG_DWORD /d 0xF080004D >nul 2>&1
:: Step 11: Register your extension in the namespace root
@reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{%CLSID%} /f /ve /t REG_SZ /d %apperance_name% >nul 2>&1
:: Step 12: Hide your extension from the Desktop
@reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /f /v {%CLSID%} /t REG_DWORD /d 0x1 >nul 2>&1
:: It will add a copy of it, so it will appear in programs file explorer like Microsoft Visual Studio
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%} /f /ve /t REG_SZ /d %apperance_name% >nul 2>&1
:: You need to give a different path to this icon, because this part can't see the C:\Windows\...etc
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\DefaultIcon /f /ve /t REG_EXPAND_SZ /d %icon_secondpath% >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%} /f /v System.IsPinnedToNamespaceTree /t REG_DWORD /d 0x1 >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%} /f /v SortOrderIndex /t REG_DWORD /d 0x42 >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\InProcServer32 /f /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\shell32.dll" >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\Instance /f /v CLSID /t REG_SZ /d "{0E5AAE11-A475-4c5b-AB00-C66DE400274E}" >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v Attributes /t REG_DWORD /d 0x11 >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\Instance\InitPropertyBag /f /v TargetFolderPath /t REG_EXPAND_SZ /d %folder_path% >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\ShellFolder /f /v FolderValueFlags /t REG_DWORD /d 0x28 >nul 2>&1
@reg add HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{%CLSID%}\ShellFolder /f /v Attributes /t REG_DWORD /d 0xF080004D >nul 2>&1