Windows应用程序添加到电脑右键菜单
1.运行cmd.exe,”以管理员身份运行“运行命令窗口
2.定位到软件包安装目录
cd \
D:
cd D:\tools\Typora
3.添加到右键菜单
reg add "HKEY_CLASSES_ROOT\*\shell\Typora" /t REG_SZ /v "" /d "Typora" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Typora" /t REG_SZ /v "" /d "Typora" /f
4.给右键菜单中添加软件图标
reg add "HKEY_CLASSES_ROOT\*\shell\Typora" /t REG_EXPAND_SZ /v "Icon" /d "%cd%\Typora.exe" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Typora" /t REG_EXPAND_SZ /v "Icon" /d "%cd%\Typora.exe" /f
5.将右键菜单关联到文件编辑器上
reg add "HKEY_CLASSES_ROOT\*\shell\Typora\command" /t REG_SZ /v "" /d "%cd%\Typora.exe ""%1""" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Typora\command" /t REG_SZ /v "" /d "%cd%\Typora.exe ""%V""" /f
6.选中一个文件,右击鼠标就可以考到列表中“Typora”选项