Pin an Icon & Directory Tree “like OneDrive”

In the left side-pane of windows 10 file explorer where there seems to be the always present, uninstallable in some cases OneDrive icon and file system tree. It is in fact removable however for any posts. Here is how to create your own application aka custom cloud integration with same look and feel as the OD schema, using nothing but a .bat script.

set guid=5BBC1013-643C-463A-B848-6DCEB146805B
set name=cyfrSpace
set folder=%%userprofile%%\cyfrSpace
set icon=C:\SOCOM\cyfr.ico

mkdir C:\Users\%username%\cyfrSpace

:: Hack registry to add cloud service file manager integration
reg add HKCU\Software\Classes\CLSID\{%guid%} /ve /t REG_SZ /d "%name%" /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\DefaultIcon /ve /t REG_EXPAND_SZ /d "%icon%" /f
reg add HKCU\Software\Classes\CLSID\{%guid%} /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0x1 /f
reg add HKCU\Software\Classes\CLSID\{%guid%} /v SortOrderIndex /t REG_DWORD /d 0x42 /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\InProcServer32 /ve /t REG_EXPAND_SZ /d %%systemroot%%\system32\shell32.dll /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance /v CLSID /t REG_SZ /d {0E5AAE11-A475-4c5b-AB00-C66DE400274E} /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance\InitPropertyBag /v Attributes /t REG_DWORD /d 0x11 /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\Instance\InitPropertyBag /v TargetFolderPath /t REG_EXPAND_SZ /d "%folder%" /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\ShellFolder /v FolderValueFlags /t REG_DWORD /d 0x28 /f
reg add HKCU\Software\Classes\CLSID\{%guid%}\ShellFolder /v Attributes /t REG_DWORD /d 0xF080004D /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{%guid%} /ve /t REG_SZ /d "%name%" /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {%guid%} /t REG_DWORD /d 0x1 /f
pause

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *