MarkdownPreview icon indicating copy to clipboard operation
MarkdownPreview copied to clipboard

Windows 7

Open Benzolio opened this issue 4 years ago • 1 comments

I'm not sure if MarkdownPreview is currently intended to support Windows 7, but I would like to report that I did manage to get this working in Windows 7, but I had to manually edit the registry. I had initially run the install.bat months ago, and after many restarts, it never took effect. Today, I really wanted to see some markdown files in the explorer preview pane, so I went digging in regedit and found HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\MarkdownPreview.MarkdownPreviewHandler which is referenced via CLSID within HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\md.1 in the registry and copied the ...\md.1\ShellEx into the registry keys for the markdown file extensions. I'm not sure if the CLSID values generated when the DLL is registered by ServerRegistrationManager.exe are expected to be consistent across systems, YMMV.

ApplyMarkdownPreviewHandlerToMdExts.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.md]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.md\ShellEx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.md\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{c92d20dd-1eb5-3256-ac0b-33d142a28a64}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mkd]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mkd\ShellEx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mkd\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{c92d20dd-1eb5-3256-ac0b-33d142a28a64}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mmd]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mmd\ShellEx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mmd\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{c92d20dd-1eb5-3256-ac0b-33d142a28a64}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mdown]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mdown\ShellEx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mdown\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{c92d20dd-1eb5-3256-ac0b-33d142a28a64}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.markdown]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.markdown\ShellEx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.markdown\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{c92d20dd-1eb5-3256-ac0b-33d142a28a64}"

So if anyone is stubbornly still running Windows 7, like me, and can't get MarkdownPreview to show up, and is comfortable messing with the windows registry, give the above a try. (You may want to check that the CLSIDs match up, though.)

Also, it would be pretty cool, if this could be automated into the install.bat

[Edit: removed extra "m" in one of the extensions.]

Benzolio avatar Feb 19 '21 18:02 Benzolio

Hi @BenMarolt , +1 for your perseverance!

I have abandoned this project, as I found the underlying initialization too unreliable and hard to debug. I have switched to MS powertoys.

I you would know how to adjust the install.bat, I would gladly update it or accept a pull request.

Thanks for sharing your solution!

Atrejoe avatar Feb 20 '21 09:02 Atrejoe