回答:
コマンドウィンドウから、「ASSOC」および「FTYPE」コマンドを使用して、ファイルタイプの関連付けを追加/編集/削除できます。
C:>assoc /?
ASSOC [.ext[=[fileType]]]
.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension
Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.
そして:
C:>ftype /?
FTYPE [fileType[=[openCommandString]]]
fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching
files of this type.
Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive.
... ...
(私のシステムでは).bkrファイルに関して、これらのコマンドは以下を返します:
C:>assoc .bkr
.bkr=bkrfile
C:>ftype bkrfile
bkrfile="F:\Program Files\path...\program.exe" "%1"
新しい「テスト」ファイル拡張子/ファイルタイプを作成しました(管理者権限が必要な場合があります)。
C:>assoc .bzb
File association not found for extension .bzb
C:>assoc .bzb=MyBZBCustomFileType
.bzb=MyBZBCustomFileType
C:>assoc .bzb
.bzb=MyBZBCustomFileType
C:>ftype MyBZBCustomFileType
File type 'MyBZBCustomFileType' not found or no open command associated with it.
C:>ftype MyBZBCustomFileType=%SystemRoot%\system32\NOTEPAD.EXE %1
MyBZBCustomFileType=C:\Windows\system32\NOTEPAD.EXE %1
C:>echo Some text.>C:\Temp\file.bzb
C:>start "" C:\Temp\file.bzb
これにより、「メモ帳」が開き、「ダミー」ファイルが編集されます。
ファイルタイプの関連付けを削除するには、まず次のようにプログラムへのファイルタイプの接続を削除します。
C:>ftype MyBZBCustomFileType
MyBZBCustomFileType=C:\Windows\system32\NOTEPAD.EXE %1
C:>ftype MyBZBCustomFileType=
File type 'MyBZBCustomFileType' not found or no open command associated with it.
次に、ファイル拡張子の関連付けを削除します(管理者権限が必要な場合があります):
C:>assoc .bzb
.bzb=MyBZBCustomFileType
C:>assoc .bzb=
C:>assoc .bzb
File association not found for extension .bzb
C:>start "" C:\Temp\file.bzb
(The dialogbox "Windows cannot open this file" opens)
C:>
GUIソリューションでは、Creative ElementsのPowerToolsを使用します。45日間無料でダウンロードして試用できます。これはツールのコレクションであり、それらのFile Type Doctor
ツールを使用してファイルタイプの関連付けを追加/編集/削除します。
assoc .bzb=
とftype MyBZBCustomFileType=
公式の方法は、ファイルの関連付けを削除するか、それを行うための別の適切な方法はありますか?ftype /?
また、ファイルの関連付けを削除するassoc /?
ために使用=
することが合法であることを使用することについて言及していないようです。
assoc /?
とからキャプチャされていftype /?
ます。以下の場合assoc /?
:Specify nothing for the file type and the command will delete the association for the file extension.
、とのためにftype /?
:Specify nothing for the open command string and the FTYPE command will delete the open command string for the file type.
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cfg
このクールなサードパーティアプリケーションであるDefault Programs Editorを使用できます。
Default Programs Editorを使用すると、コンテキストメニュー項目、アイコン、説明など、Windowsのファイルの関連付け設定を簡単に修正できます。また、自動再生設定とデフォルトのプログラム設定...すべて、レジストリをいじる必要はありません。
組み込みのWindows 7ツール(UIツール)で関連付けを変更する方法(削除は許可されていないようです)は、[スタート]メニューを開き、[ 既定のプログラム]を選択します。(または、存在しない場合は、[スタート]メニュー、[コントロールパネル]([カテゴリごとに表示]から[大きいアイコンで表示]に変更する必要がある場合があります)、[ デフォルトプログラム]を開きます。)
次に、[ ファイルの種類またはプロトコルをプログラムに関連付ける]を選択します。コンピューターで現在構成されている関連付けのリストが表示されます。変更する拡張機能を見つけてダブルクリックし、構成を変更します。
.cfgファイルを右クリック->で開く->デフォルトプログラムの選択。次に、[選択したプログラムを常に使用してこの種類のファイルを開く]をオンにし、リストからプログラムを選択するか、[参照]ボタンをクリックしてファイルシステムからプログラムを手動で選択します。
画像付きの完全ガイド:http : //www.sevenforums.com/tutorials/12196-open-change-default-program.html