|
:: Windows Explorer Cloud Storage Provider Navigation Pane |
|
:: Source: https://docs.microsoft.com/en-gb/windows/win32/shell/integrate-cloud-storage |
|
|
|
@echo off |
|
|
|
set guid=4ce64c33-baf6-4491-90b1-1de2ff09276b |
|
set name=Visual Studio 2019 |
|
set icon=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe |
|
set folder=%%USERPROFILE%%\Source |
|
|
|
:: Step 1: Add your CLSID and name your extension |
|
reg add HKCU\Software\Classes\CLSID\{%guid%} /ve /t REG_SZ /d "%name%" /f |
|
|
|
:: Step 2: Set the image for your icon |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\DefaultIcon /ve /t REG_EXPAND_SZ /d "%icon%" /f |
|
|
|
:: Step 3: Add your extension to the Navigation Pane and make it visible |
|
reg add HKCU\Software\Classes\CLSID\{%guid%} /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0x1 /f |
|
|
|
:: Step 4: Set the location for your extension in the Navigation Pane |
|
reg add HKCU\Software\Classes\CLSID\{%guid%} /v SortOrderIndex /t REG_DWORD /d 0x42 /f |
|
|
|
:: Step 5: Provide the dll that hosts your extension. |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\InProcServer32 /ve /t REG_EXPAND_SZ /d %%systemroot%%\system32\shell32.dll /f |
|
|
|
:: Step 6: Define the instance object |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance /v CLSID /t REG_SZ /d {0E5AAE11-A475-4c5b-AB00-C66DE400274E} /f |
|
|
|
:: Step 7: Provide the file system attributes of the target folder |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance\InitPropertyBag /v Attributes /t REG_DWORD /d 0x11 /f |
|
|
|
:: Step 8: Set the path for the sync root |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance\InitPropertyBag /v TargetFolderPath /t REG_EXPAND_SZ /d "%folder%" /f |
|
|
|
:: Step 9: Set appropriate shell flags |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\ShellFolder /v FolderValueFlags /t REG_DWORD /d 0x28 /f |
|
|
|
:: Step 10: Set the appropriate flags to control your shell behavior |
|
reg add HKCU\Software\Classes\CLSID\{%guid%}\ShellFolder /v Attributes /t REG_DWORD /d 0xF080004D /f |
|
|
|
:: Step 11: Register your extension in the namespace root |
|
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{%guid%} /ve /t REG_SZ /d "%name%" /f |
|
|
|
:: Step 12: Hide your extension from the Desktop |
|
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {%guid%} /t REG_DWORD /d 0x1 /f |