如何在注册表中更改文件类型关联? [英] How to change filetype association in the registry?
问题描述
第一次发布的计算器。 :D 我需要我的软件,增加一两件事情在注册表中。
first time posting in StackOverflow. :D I need my software to add a couple of things in the registry.
我的程序将使用
的Process.Start(@blblabla.smc);
要启动的文件,但问题是,最有可能的用户将不具有程序设定作为用于特定文件扩展名缺省应用
to launch a file, but the problem is that most likely the user will not have a program set as default application for the particular file extension.
我如何添加文件关联到WindowsRegistry?
推荐答案
除了已经提供的答案,你可以通过调用命令行程序ASSOC和FTYPE做到这一点。 FTYPE相关联的程序的文件类型。 ASSOC关联的文件扩展名通过FTYPE指定的文件类型。例如:
In addition to the answers already provided, you can accomplish this by calling the command line programs "ASSOC" and "FTYPE". FTYPE associates a file type with a program. ASSOC associates a file extension with the file type specified through FTYPE. For example:
FTYPE SMCFile="C:\some_path\SMCProgram.exe" -some_option %1 %*
ASSOC .smc=SMCFile
这将使在注册表中的必要的条目。欲了解更多信息,请键入 ASSOC /?
或 FTYPE /?
在命令提示符下。
This will make the necessary entries in the registry. For more information, type ASSOC /?
or FTYPE /?
at the command prompt.
这篇关于如何在注册表中更改文件类型关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!