ลบการเชื่อมโยงประเภทไฟล์ใน Windows 7 [ซ้ำกัน]


13

ฉันได้ตั้งค่าการเชื่อมโยงไฟล์ที่กำหนดเอง.cfgเพื่อเปิดในWordPadแต่ดูเหมือนว่าฉันจะไม่สามารถหาวิธีลบมันได้ ฉันจะลบการเชื่อมโยงไฟล์ใน Windows 7 ได้อย่างไร

คำตอบ:


13

จากหน้าต่างคำสั่งคุณสามารถใช้คำสั่ง "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  

สิ่งนี้จะเปิด "Notepad" เพื่อแก้ไขไฟล์ "dummy" ของฉัน

หากต้องการลบความสัมพันธ์ของประเภทไฟล์ขั้นแรกให้ลบการเชื่อมต่อของประเภทไฟล์กับโปรแกรมดังนี้:

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 ผมใช้PowerTools จากองค์ประกอบความคิดสร้างสรรค์ คุณสามารถดาวน์โหลดและใช้งานฟรี 45 วันเมื่อทดลองใช้ นี่คือชุดเครื่องมือและคุณจะใช้File Type Doctorเครื่องมือเพื่อเพิ่ม / แก้ไข / ลบการเชื่อมโยงประเภทไฟล์


2
สิ่งนี้ดูเหมือนจะไม่ทำงานสำหรับการเชื่อมโยงที่สร้างโดยผู้ใช้ผ่าน GUI
ทำให้หมดความสามารถ

@depquid - คุณได้รับข้อความแสดงข้อผิดพลาดเมื่อคุณลองหรือไม่หรือไม่ก็เงียบ ๆ ? โปรดทราบว่าคุณอาจต้องเปิดพรอมต์คำสั่งในฐานะผู้ดูแลระบบเพื่อให้ทำงานได้ (assoc / ftype) นอกจากนี้ฉันเพิ่มข้อมูลบน GUI (ตัวแก้ไขประเภทไฟล์) ที่ฉันใช้ ... มันควรจะทำงานให้คุณ
Kevin Fegan

@KevinFegan เป็นassoc .bzb= และftype MyBZBCustomFileType= วิธีการอย่างเป็นทางการในการลบความสัมพันธ์ของแฟ้มหรือมีอีกวิธีการที่เหมาะสมที่จะทำมันได้หรือไม่ ftype /?และassoc /?ดูเหมือนจะไม่พูดถึงการใช้งานที่ถูกกฎหมายที่จะใช้=เพื่อลบการเชื่อมโยงไฟล์
Pacerier

@Pacerier - ถ้าคุณตรวจสอบคำตอบของฉัน (เหนือ) เป็นครั้งแรกที่ 2 "รหัส" ส่วนที่ถูกจับจากและ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.
Kevin Fegan

@KevinFegan, Ic
Pacerier

5

คุณสามารถลบการเชื่อมโยงในรีจิสตรีได้:

HKEY_CLASSES_ROOT\.cfg\ShellEx\

และลบคีย์ด้วยGUIDที่สอดคล้องกับ WordPad


1
ที่จะลบมันทั้งหมดถ้านั่นคือสิ่งที่คุณต้องการ หากคุณต้องการเปลี่ยนให้คลิกขวาและเลือก "เปิดด้วย" จากนั้นเลือกโปรแกรมใหม่และทำเครื่องหมายที่ "ใช้สิ่งนี้เสมอเพื่อเปิดไฟล์ประเภทนี้"
LilCodger

2
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cfg
Steve Pitchers

4

คุณสามารถใช้แอปพลิเคชั่นบุคคลที่สามสุดยอดตัวแก้ไขโปรแกรมเริ่มต้น :

ตัวแก้ไขโปรแกรมเริ่มต้นทำให้ง่ายต่อการแก้ไขการตั้งค่าการเชื่อมโยงไฟล์ใน Windows รวมถึงรายการเมนูบริบทไอคอนและคำอธิบาย นอกจากนี้: การตั้งค่าเล่นอัตโนมัติและการตั้งค่าโปรแกรมเริ่มต้น ... ทั้งหมดโดยไม่เล่นซอในรีจิสทรี

ป้อนคำอธิบายภาพที่นี่


2

วิธีที่สมาคมการเปลี่ยนแปลง (มันดูเหมือนจะไม่ปล่อยให้คุณลบแม้ว่า) ที่มีในตัว Windows 7 เครื่องมือ (คน UI) คือการเปิดเมนู Startแล้วเลือกโปรแกรมเริ่มต้น (หรือหากไม่มีอยู่ให้เปิดเมนูเริ่ม , แผงควบคุม (คุณอาจต้องเปลี่ยนจากดูตามหมวดหมู่เป็นดูตามไอคอนขนาดใหญ่ ) จากนั้นเลือกโปรแกรมเริ่มต้น )

จากนั้นเลือกประเภทไฟล์รองหรือโปรโตคอลกับโปรแกรม คุณจะได้รับรายชื่อสมาคมที่กำหนดค่าไว้ในคอมพิวเตอร์ของคุณ ค้นหาส่วนขยายที่คุณต้องการเปลี่ยนและดับเบิลคลิกเพื่อขยายการกำหนดค่า


0

คลิกขวาที่ไฟล์. cfg -> เปิดด้วย -> เลือกโปรแกรมเริ่มต้น จากนั้นทำเครื่องหมายที่ "ใช้โปรแกรมที่เลือกเพื่อเปิดไฟล์ประเภทนี้เสมอ" และเลือกโปรแกรมจากรายการหรือคลิกปุ่มเรียกดูเพื่อเลือกโปรแกรมด้วยตนเองจากระบบไฟล์

คู่มือฉบับสมบูรณ์พร้อมรูปภาพ: http://www.sevenforums.com/tutorials/12196-open-change-default-program.html


5
ใช่ แต่เป็นไปได้ไหมที่จะลบด้วยวิธีนี้
Nathan2055
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.