Is it possible to launch a file's default editor from a batch file?

元气小坏坏 提交于 2019-12-05 18:33:14

Those items on the right-click menu are called Shell Verbs, they can be invoked by name for a target file but not with any direct batch or windows command.

Win7/2k8r2 upwards you can use PowerShell to do it from your batch file:

powershell -command "start -verb edit 'C:\art\source\StackOverflowLogo.PDF'" 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!