简单的ftype命令不起作用 [英] Simple ftype command not working

查看:67
本文介绍了简单的ftype命令不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让ftype创建一个新文件类型,但是它不起作用:(。这是我的命令: ftype testing = cmd.exe%1 但它表示找不到文件类型 testing或没有与之关联的打开命令。

I am trying to get ftype create a new filetype but it is not working :(. Here is my command: ftype testing="cmd.exe" "%1" but it says File type 'testing' not found or no open command associated with it.

我没有不知道为什么它不起作用,我还遵循了MSDN中提到的文档。

I don't know why it is not working, I also followed the documentation mentioned in MSDN.

推荐答案

这些命令在Vista或

Those commands seems not working in Vista or superior.

您不再需要它,只需使用REG.EXE命令调整注册表即可建立关联:

You don't need that anymore. Simply adjust your REGISTRY using REG.EXE command to make associations:

REM COMMENT
REM THIS IS AN EXAMPLE. CREATE ABOVE BATCH FILE AND EXECUTE IT.
REM You will be able to open Python files 

reg.exe add "%key%\.py" /f /t REG_SZ /d "Python.File" >NUL 2>NUL

reg.exe add "%key%\Python.File" /f /t REG_SZ /d "Python File" >NUL 2>NUL

reg.exe add "%key%\Python.File\DefaultIcon" /f /t REG_SZ /d "%pyhome%DLLs\py.ico" >NUL 2>NUL

reg.exe add "%key%\Python.File\shell\Edit with IDLE\command" /f /t REG_SZ /d "\"%pyhome%pythonw.exe\" \"%pyhome%Lib\idlelib\idle.pyw\" -e \"%%1\"" >NUL 2>NUL

reg.exe add "%key%\Python.File\shell\open\command" /f /t REG_SZ /d "\"%pyhome%pywin.bat\" \"%%1\" %%*" >NUL 2>NUL

reg.exe add "%key%\Python.File\shellex\DropHandler" /f /t REG_SZ /d "{60254CA5-953B-11CF-8C96-00AA00B8708C}" >NUL 2>NUL

这篇关于简单的ftype命令不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆