![如何将项目添加到 Windows 10 资源管理器侧栏](https://linux22.com/image/1514194/%E5%A6%82%E4%BD%95%E5%B0%86%E9%A1%B9%E7%9B%AE%E6%B7%BB%E5%8A%A0%E5%88%B0%20Windows%2010%20%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86%E5%99%A8%E4%BE%A7%E6%A0%8F.png)
答案1
注意:这也适用于NextCloud
更新:对于 Win10,这里有一个稍微不同的方法,如果您同时使用它们,它不会与谷歌驱动器冲突 - 使用旧方法,如果您通过侧边栏图标进入 ownCloud 文件夹,然后右键单击一个文件并尝试谷歌驱动器 - 共享或上下文菜单中的任何其他选项,它将停止工作,直到您启动资源管理器的新实例。
这种方法不会给您带来这个问题。
简而言之,只需创建以下 .bat 并注意默认图标路径,当然还有 TargetFolderPath(在本例中为 d:\ownCloud)(旧帖子和解决方案位于 .bat 的代码块下方
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79} /ve /t REG_SZ /d "Radius Cloud" /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\DefaultIcon /ve /t REG_EXPAND_SZ /d "C:\Program Files (x86)\ownCloud\owncloud.exe,0" /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79} /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0x1 /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79} /v SortOrderIndex /t REG_DWORD /d 0x42 /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\InProcServer32 /ve /t REG_EXPAND_SZ /d %%systemroot%%\system32\shell32.dll /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance /v CLSID /t REG_SZ /d {0E5AAE11-A475-4c5b-AB00-C66DE400274E} /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance\InitPropertyBag /v Attributes /t REG_DWORD /d 0x11 /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance\InitPropertyBag /v TargetFolderPath /t REG_EXPAND_SZ /d D:\ownCloud /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\ShellFolder /v FolderValueFlags /t REG_DWORD /d 0x28 /f
reg add HKCU\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\ShellFolder /v Attributes /t REG_DWORD /d 0xF080004D /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{9499128F-5BF8-4F88-989C-B5FE5F058E79} /ve /t REG_SZ /d ownCloud /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {9499128F-5BF8-4F88-989C-B5FE5F058E79} /t REG_DWORD /d 0x1 /f
这是我做的。如果您需要帮助删除它,请告诉我。在 Win 10 Pro 上测试。
结果:
在下面的脚本中,您需要:
- 将每个出现的 CLSID 替换为您自己的(在线生成或使用 guidgen.exe)
- 指定您的 ownCloud 文件夹的路径(出现两次):
"TargetFolderPath"="x:\\pathTo-ownCloudFolder"
您还可以通过修改此行(出现两次)来替换默认图标:
@="C:\\Program Files (x86)\\ownCloud\\owncloud.exe,0"
如果您使用 NextCloud,则需要更改为:@="C:\\Program Files (x86)\\NextCloud\\nextcloud.exe,0"
以显示默认图标。
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}]
@="ownCloud"
"System.IsPinnedToNamespaceTree"=dword:00000001
"SortOrderIndex"=dword:00000042
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\InProcServer32]
@=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4D,00,52,00,4F,00,4F,00,54,00,\
25,00,5C,00,73,00,79,00,73,00,74,00,65,00,6D,00,33,00,32,00,5C,00,73,00,68,\
00,65,00,6C,00,6C,00,33,00,32,00,2E,00,64,00,6C,00,6C,00,00,00
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\ShellFolder]
"FolderValueFlags"=dword:00000028
"Attributes"=dword:f080004d
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}]
@="ownCloud"
"System.IsPinnedToNamespaceTree"=dword:00000001
"SortOrderIndex"=dword:00000042
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\InProcServer32]
@=hex(2):25,00,53,00,59,00,53,00,54,00,45,00,4D,00,52,00,4F,00,4F,00,54,00,\
25,00,5C,00,73,00,79,00,73,00,74,00,65,00,6D,00,33,00,32,00,5C,00,73,00,68,\
00,65,00,6C,00,6C,00,33,00,32,00,2E,00,64,00,6C,00,6C,00,00,00
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\ShellFolder]
"FolderValueFlags"=dword:00000028
"Attributes"=dword:f080004d
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\DefaultIcon]
@="C:\\Program Files (x86)\\ownCloud\\owncloud.exe,0"
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance]
"CLSID"="{0E5AAE11-A475-4c5b-AB00-C66DE400274E}"
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance\InitPropertyBag]
"Attributes"=dword:00000011
"TargetFolderPath"="x:\\pathTo-ownCloudFolder"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
"{9499128F-5BF8-4F88-989C-B5FE5F058E79}"=dword:00000001
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{9499128F-5BF8-4F88-989C-B5FE5F058E79}]
@="ownCloud"
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\DefaultIcon]
@="C:\\Program Files (x86)\\owncloud\\owncloud.exe,0"
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance]
"CLSID"="{0E5AAE11-A475-4c5b-AB00-C66DE400274E}"
[HKEY_CURRENT_USER\Software\Classes\CLSID\{9499128F-5BF8-4F88-989C-B5FE5F058E79}\Instance\InitPropertyBag]
"Attributes"=dword:00000011
"TargetFolderPath"="x:\\pathTo-ownCloudFolder"