Windows通用文件关联错误恢复

Windows通用文件关联错误恢复

1.问题情况
2.解决思路
3.通过编写脚本恢复文件关联
4.文件恢复代码
5.补充



本文章演示的是所有文件关联被打乱的情况,如果只有少部分文件关联出现问题运行下面bat脚本代码即可



一、问题情况

最近有朋友因为受到一些病毒或者误操作等原因将文件关联全部该乱不能进行任何操作。
效果如下:

病毒或者误操作导致的文件关联混乱
被病毒或者误操作导致的文件关联混乱
运行中启动cmd失败,被关联成了txt文件
在这里插入图片描述
注册表同意无法通过运行打开
在这里插入图片描述

二、解决思路

1.重新写一个文件关联表,用脚本对所有的关联文件进行重新关联,同时想办法启动运行窗口运行脚本。

2.使用系统自带的系统还原的方法:
系统自带的系统还原:“开始”/“程序”/“附件”/“系统工具”/“系统还原”,点选“恢复我的计算机到一个较早的时间”,按下一步,你会看到日期页面有深色的日期,那就是还原点,你选择后,点击下一步还原(Win7还原系统,在控制面板然后设备和安全子选项然后备份和还原子选项)重新还原后即可。

3.还是不行就重装系统,不过肯定是可以通过代码恢复的
在这里插入图片描述







三、通过编写脚本恢复文件关联

1.编写恢复文件关联的bat脚本
在这里插入图片描述

但是在这种情况有一个很明显的问题就是,因为文件关联混乱导致无法运行bat脚本,同时再加上注册表无法打开,无疑是雪上加霜。
在这里插入图片描述

所以我们需要想办法用cmd将bat文件运行起来
而想要启用cmd,普通的方式显然不行,我们需要换一个角度看待问题!
在这里插入图片描述
与此同时,我想到了打开方式,打开方式与文件关联不一样,属于不同的注册表位置,我们可以用打开方式的方法来打开cmd恢复bat脚本的文件关联

2.用打开方式的方法打开cmd
在这里插入图片描述
在打开方式中,我们选择浏览跟多来找到cmd程序的目录
在这里插入图片描述

提示:直接打开是不行的,因为cmd.exe的文件关联已经被修改,打开将会出现各种情况

在这里插入图片描述
选择以cmd的方式打开,用这种方法就可以成功的改变当前文件打开的类型,成功的打开cmd
在这里插入图片描述
3.文件打开后用命令assco .bat=batfile 恢复bat文件关联,从而就可以运行bat恢复脚本
在这里插入图片描述
4.运行恢复脚本
在这里插入图片描述
恢复脚本运行后,就会成功的将所有的文件关联进行重置,所有的程序成功的完成了文件恢复
在这里插入图片描述



四、文件恢复代码



将代码负责到txt文本中,然后修改文本后缀为bat即可

@echo off
assoc .001=WinRAR
assoc .386=vxdfile
assoc .3g2=WMP11assoc .AssocFileassoc .3G2
assoc .3gp=WMP11assoc .AssocFileassoc .3GP
assoc .3gp2=WMP11assoc .AssocFileassoc .3G2
assoc .3gpp=WMP11assoc .AssocFileassoc .3GP
assoc .5vw=wireshark-capture-file
assoc .7z=WinRAR
assoc .AAC=WMP11assoc .AssocFileassoc .ADTS
assoc .accda=Accessassoc .ACCDAExtensionassoc .14
assoc .accdb=Accessassoc .Applicationassoc .14
assoc .accdc=Accessassoc .ACCDCFileassoc .14
assoc .accde=Accessassoc .ACCDEFileassoc .14
assoc .accdr=Accessassoc .ACCDRFileassoc .14
assoc .accdt=Accessassoc .ACCDTFileassoc .14
assoc .accdu=Accessassoc .WizardUserDataFileassoc .14
assoc .accdw=Accessassoc .WebApplicationReferenceassoc .14
assoc .accft=Accessassoc .ACCFTFileassoc .14
assoc .ace=WinRAR
assoc .acl=ACLFile
assoc .acp=wireshark-capture-file
assoc .ade=Accessassoc .ADEFileassoc .14
assoc .adn=Accessassoc .BlankProjectTemplateassoc .14
assoc .adp=Accessassoc .Projectassoc .14
assoc .ADT=WMP11assoc .AssocFileassoc .ADTS
assoc .ADTS=WMP11assoc .AssocFileassoc .ADTS
assoc .aif=WMP11assoc .AssocFileassoc .AIFF
assoc .aifc=WMP11assoc .AssocFileassoc .AIFF
assoc .aiff=WMP11assoc .AssocFileassoc .AIFF
assoc .ani=anifile
assoc .apc=wireshark-capture-file
assoc .apk=ldmnqassoc .apk
assoc .app=Visualassoc .FoxProassoc .Applicationassoc .6
assoc .application=Applicationassoc .Manifest
assoc .appref-ms=Applicationassoc .Reference
assoc .arj=WinRAR
assoc .asa=aspfile
assoc .asf=WMP11assoc .AssocFileassoc .ASF
assoc .asp=aspfile
assoc .asx=WMP11assoc .AssocFileassoc .ASX
assoc .atc=wireshark-capture-file
assoc .au=WMP11assoc .AssocFileassoc .AU
assoc .avi=WMP11assoc .AssocFileassoc .AVI
assoc .aw=AWFile
assoc .bat=batfile
assoc .bat = assoc .txtfile
assoc .bfr=wireshark-capture-file
assoc .blg=Diagnosticassoc .Perfmonassoc .Document
assoc .bmp=Paintassoc .Picture
assoc .bz=WinRAR
assoc .bz2=WinRAR
assoc .c=CFreeassoc .c
assoc .c2r=MediaCenterassoc .C2R
assoc .cab=WinRAR
assoc .camp=campfile
assoc .cap=wireshark-capture-file
assoc .cat=CATFile
assoc .cda=WMP11assoc .AssocFileassoc .CDA
assoc .cdmp=cdmpfile
assoc .cdx=Visualassoc .FoxProassoc .Index
assoc .cer=CERFile
assoc .cfp=CFreeassoc .cfp
assoc .cfpg=CFreeassoc .cfpg
assoc .ChessTitansSave-ms=MicrosoftChessTitansSaveFile
assoc .chk=chkfile
assoc .chm=chmassoc .file
assoc .cmd=cmdfile
assoc .com=comfile
assoc .ComfyCakesSave-ms=MicrosoftComfyCakesSaveFile
assoc .compositefont=Windowsassoc .CompositeFont
assoc .contact=contact_wab_auto_file
assoc .cpl=cplfile
assoc .cpp=CFreeassoc .cpp
assoc .crd=Microsoftassoc .InformationCard
assoc .crds=Microsoftassoc .WindowsCardSpaceBackup
assoc .crl=CRLFile
assoc .crt=CERFile
assoc .crtx=CRTXFile
assoc .css=CSSfile
assoc .csv=Excelassoc .CSV
assoc .cur=curfile
assoc .cwb=SogouImeConfig
assoc .db=dbfile
assoc .dbc=Visualassoc .FoxProassoc .Database
assoc .dbf=Visualassoc .FoxProassoc .Table
assoc .dct=Visualassoc .FoxProassoc .Database
assoc .dctx=IMEDictionaryCompiler
assoc .dctxc=IMEDictionaryCompiler
assoc .der=CERFile
assoc .desklink=CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}
assoc .det=Outlookassoc .Fileassoc .detassoc .14
assoc .diagcab=Diagnosticassoc .Cabinet
assoc .diagcfg=Diagnosticassoc .Config
assoc .diagpkg=Diagnosticassoc .Document
assoc .dib=Paintassoc .Picture
assoc .dic=txtfile
assoc .dll=dllfile
assoc .doc=Wordassoc .Documentassoc .8
assoc .dochtml=wordhtmlfile
assoc .docm=Wordassoc .DocumentMacroEnabledassoc .12
assoc .docmhtml=wordmhtmlfile
assoc .docx=Wordassoc .Documentassoc .12
assoc .docxml=wordxmlfile
assoc .dot=Wordassoc .Templateassoc .8
assoc .dothtml=wordhtmltemplate
assoc .dotm=Wordassoc .TemplateMacroEnabledassoc .12
assoc .dotx=Wordassoc .Templateassoc .12
assoc .dqy=dqyfile
assoc .drv=drvfile
assoc .dsn=MSDASQL
assoc .DVR=MediaCenterassoc .DVR
assoc .DVR-MS=MediaCenterassoc .DVR-MS
assoc .dwfx=Windowsassoc .XPSReachViewer
assoc .easmx=Windowsassoc .XPSReachViewer
assoc .edrwx=Windowsassoc .XPSReachViewer
assoc .elm=ELMFile
assoc .emf=emffile
assoc .eml=Outlookassoc .Fileassoc .emlassoc .14
assoc .enc=wireshark-capture-file
assoc .eprtx=Windowsassoc .XPSReachViewer
assoc .erf=wireshark-capture-file
assoc .evt=evtfile
assoc .evtx=evtxfile
assoc .exc=txtfile
assoc .exe=exefile
assoc .fdc=wireshark-capture-file
assoc .fdf=FoxitReaderassoc .FDFDoc
assoc .fdm=Outlookassoc .Fileassoc .fdmassoc .14
assoc .fon=fonfile
assoc .fpt=Visualassoc .FoxProassoc .Table
assoc .FreeCellSave-ms=MicrosoftFreeCellSaveFile
assoc .frt=Visualassoc .FoxProassoc .Report
assoc .frx=Visualassoc .FoxProassoc .Report
assoc .fxp=Visualassoc .FoxProassoc .Compiledassoc .Program
assoc .gadget=Windowsassoc .gadget
assoc .gcsx=GCSXFile
assoc .gfs=GrooveStub
assoc .gif=giffile
assoc .glk=GrooveLinkFile
assoc .glox=GLOXFile
assoc .gmmp=gmmpfile
assoc .gqsx=GQSXFile
assoc .gra=MSGraphassoc .Chartassoc .8
assoc .group=group_wab_auto_file
assoc .grp=MSProgramGroup
assoc .grv=GrooveFile
assoc .gsa=GrooveSpaceArchive
assoc .gta=GrooveToolArchive
assoc .gz=WinRAR
assoc .h=CFreeassoc .h
assoc .H1C=h1cfile
assoc .H1D=h1dfile
assoc .H1F=h1ffile
assoc .H1H=h1hfile
assoc .H1K=h1kfile
assoc .H1Q=h1qfile
assoc .H1S=h1sfile
assoc .H1T=h1tfile
assoc .H1V=h1vfile
assoc .H1W=h1wfile
assoc .HeartsSave-ms=MicrosoftHeartsSaveFile
assoc .hlp=hlpfile
assoc .hol=Outlookassoc .Fileassoc .holassoc .14
assoc .hpp=CFreeassoc .hpp
assoc .hta=htafile
assoc .htm=htmlfile
assoc .html=htmlfile
assoc .hxa=MSHelpassoc .hxaassoc .2assoc .5
assoc .hxc=MSHelpassoc .hxcassoc .2assoc .5
assoc .hxd=MSHelpassoc .hxdassoc .2assoc .5
assoc .hxe=MSHelpassoc .hxeassoc .2assoc .5
assoc .hxf=MSHelpassoc .hxfassoc .2assoc .5
assoc .hxh=MSHelpassoc .hxhassoc .2assoc .5
assoc .hxi=MSHelpassoc .hxiassoc .2assoc .5
assoc .hxk=MSHelpassoc .hxkassoc .2assoc .5
assoc .hxq=MSHelpassoc .hxqassoc .2assoc .5
assoc .hxr=MSHelpassoc .hxrassoc .2assoc .5
assoc .hxs=MSHelpassoc .hxsassoc .2assoc .5
assoc .hxt=MSHelpassoc .hxtassoc .2assoc .5
assoc .hxv=MSHelpassoc .hxvassoc .2assoc .5
assoc .hxw=MSHelpassoc .hxaassoc .2assoc .5
assoc .icc=icmfile
assoc .icl=IconLibraryFile
assoc .icm=icmfile
assoc .ico=icofile
assoc .ics=Outlookassoc .Fileassoc .icsassoc .14
assoc .igp=Intelassoc .GraphicsControlPanelassoc .igpassoc .1
assoc .imesx=imesxfile
assoc .img=Windowsassoc .IsoFile
assoc .inf=inffile
assoc .infopathxml=InfoPathassoc .Documentassoc .3
assoc .ini=inifile
assoc .ipfix=wireshark-capture-file
assoc .iqy=iqyfile
assoc .iso=Windowsassoc .IsoFile
assoc .jfif=pjpegfile
assoc .jnt=jntfile
assoc .Job=JobObject
assoc .jod=Microsoftassoc .Jetassoc .OLEDBassoc .4assoc .0
assoc .jpe=jpegfile
assoc .jpeg=jpegfile
assoc .jpg=jpegfile
assoc .js=JSFile
assoc .JSE=JSEFile
assoc .jtp=jtpfile
assoc .jtx=Windowsassoc .XPSReachViewer
assoc .label=Label
assoc .laccdb=Accessassoc .LockFileassoc .14
assoc .lbt=Visualassoc .FoxProassoc .Label
assoc .lbx=Visualassoc .FoxProassoc .Label
assoc .lcap=wireshark-capture-file
assoc .ldb=Accessassoc .LockFileassoc .14
assoc .ldbk=ldmnqassoc .ldbk
assoc .lex=LEXFile
assoc .lha=WinRAR
assoc .library-ms=LibraryFolder
assoc .lnk=lnkfile
assoc .log=txtfile
assoc .lua=GooglePinyinIMEassoc .Extensionassoc .Lua
assoc .lz=WinRAR
assoc .lzh=WinRAR
assoc .m1v=WMP11assoc .AssocFileassoc .MPEG
assoc .M2T=WMP11assoc .AssocFileassoc .M2TS
assoc .M2TS=WMP11assoc .AssocFileassoc .M2TS
assoc .M2V=WMP11assoc .AssocFileassoc .MPEG
assoc .m3u=WMP11assoc .AssocFileassoc .m3u
assoc .m4a=WMP11assoc .AssocFileassoc .M4A
assoc .m4v=WMP11assoc .AssocFileassoc .MP4
assoc .mad=Accessassoc .Shortcutassoc .Moduleassoc .1
assoc .maf=Accessassoc .Shortcutassoc .Formassoc .1
assoc .mag=Accessassoc .Shortcutassoc .Diagramassoc .1
assoc .MahjongTitansSave-ms=MicrosoftMahjongTitansSaveFile
assoc .mam=Accessassoc .Shortcutassoc .Macroassoc .1
assoc .mapimail=CLSID\{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}
assoc .maq=Accessassoc .Shortcutassoc .Queryassoc .1
assoc .mar=Accessassoc .Shortcutassoc .Reportassoc .1
assoc .mas=Accessassoc .Shortcutassoc .StoredProcedureassoc .1
assoc .mat=Accessassoc .Shortcutassoc .Tableassoc .1
assoc .mau=Accessassoc .Shortcutassoc .Functionassoc .1
assoc .mav=Accessassoc .Shortcutassoc .Viewassoc .1
assoc .maw=Accessassoc .Shortcutassoc .DataAccessPageassoc .1
assoc .mcl=MediaCenterassoc .MCL
assoc .mda=Accessassoc .Extensionassoc .14
assoc .mdb=Accessassoc .MDBFile
assoc .mdbhtml=accesshtmlfile
assoc .mde=Accessassoc .MDEFileassoc .14
assoc .mdn=Accessassoc .BlankDatabaseTemplateassoc .14
assoc .mdt=Accessassoc .WizardDataFileassoc .14
assoc .mdw=Accessassoc .Workgroupassoc .14
assoc .mgc=MediaCatalogMGC
assoc .mht=mhtmlfile
assoc .mhtml=mhtmlfile
assoc .mid=WMP11assoc .AssocFileassoc .MIDI
assoc .midi=WMP11assoc .AssocFileassoc .MIDI
assoc .mig=migfile
assoc .MinesweeperSave-ms=MicrosoftMinesweeperSaveFile
assoc .mlc=LpkSetupassoc .1
assoc .mml=MediaCatalogMML
assoc .mmw=MediaCatalogMMW
assoc .mnt=Visualassoc .FoxProassoc .Menu
assoc .mnx=Visualassoc .FoxProassoc .Menu
assoc .MOD=WMP11assoc .AssocFileassoc .MPEG
assoc .mov=WMP11assoc .AssocFileassoc .MOV
assoc .mp2=WMP11assoc .AssocFileassoc .MP3
assoc .mp2v=WMP11assoc .AssocFileassoc .MPEG
assoc .mp3=WMP11assoc .AssocFileassoc .MP3
assoc .mp4=WMP11assoc .AssocFileassoc .MP4
assoc .mp4v=WMP11assoc .AssocFileassoc .MP4
assoc .mpa=WMP11assoc .AssocFileassoc .MPEG
assoc .mpe=WMP11assoc .AssocFileassoc .MPEG
assoc .mpeg=WMP11assoc .AssocFileassoc .MPEG
assoc .mpf=MediaPackageFile
assoc .mpg=WMP11assoc .AssocFileassoc .MPEG
assoc .mplog=wireshark-capture-file
assoc .mpr=Visualassoc .FoxProassoc .Menu
assoc .mpv2=WMP11assoc .AssocFileassoc .MPEG
assoc .mpx=Visualassoc .FoxProassoc .Menu
assoc .msc=MSCFile
assoc .msdvd=Windowsassoc .DVDassoc .Maker
assoc .msg=Outlookassoc .Fileassoc .msgassoc .14
assoc .msi=Msiassoc .Package
assoc .msp=Msiassoc .Patch
assoc .msrcincident=RemoteAssistanceassoc .1
assoc .msstyles=msstylesfile
assoc .msu=Microsoftassoc .Systemassoc .Updateassoc .1
assoc .MTS=WMP11assoc .AssocFileassoc .M2TS
assoc .mydocs=CLSID\{ECF03A32-103D-11d2-854D-006008059367}
assoc .nfo=MSInfoFile
assoc .nk2=Outlookassoc .Fileassoc .nk2assoc .14
assoc .ntar=wireshark-capture-file
assoc .nvram=VMwareassoc .VMBios
assoc .ocx=ocxfile
assoc .odc=odcfile
assoc .odccubefile=odccubefile
assoc .odcdatabasefile=odcdatabasefile
assoc .odcnewfile=odcnewfile
assoc .odctablefile=odctablefile
assoc .odp=PowerPointassoc .OpenDocumentPresentationassoc .12
assoc .ods=Excelassoc .OpenDocumentSpreadsheetassoc .12
assoc .odt=Wordassoc .OpenDocumentTextassoc .12
assoc .ofd=FoxitReaderOFDassoc .Documet
assoc .ofs=Outlookassoc .Fileassoc .ofsassoc .14
assoc .oft=Outlookassoc .Fileassoc .oftassoc .14
assoc .ols=OfficeListShortcut
assoc .one=OneNoteassoc .Sectionassoc .1
assoc .onepkg=OneNoteassoc .Package
assoc .onetoc=OneNoteassoc .TableOfContents
assoc .onetoc2=OneNoteassoc .TableOfContentsassoc .12
assoc .opc=OPCFile
assoc .oqy=oqyfile
assoc .osdx=opensearchdescription
assoc .ost=Outlookassoc .Fileassoc .ostassoc .14
assoc .otf=otffile
assoc .otm=Outlookassoc .Fileassoc .otmassoc .14
assoc .out=wireshark-capture-file
assoc .ova=VMwareassoc .OVAPackage
assoc .ovf=VMwareassoc .OVFPackage
assoc .p10=P10File
assoc .p12=PFXFile
assoc .p7b=SPCFile
assoc .p7c=certificate_wab_auto_file
assoc .p7m=P7MFile
assoc .p7r=P7RFile
assoc .p7s=P7SFile
assoc .pab=Outlookassoc .Fileassoc .pabassoc .14
assoc .pbk=pbkfile
assoc .pcap=wireshark-capture-file
assoc .pcapng=wireshark-capture-file
assoc .pcb=PCBFile
assoc .pdf=FoxitReaderassoc .Document
assoc .perfmoncfg=Diagnosticassoc .Perfmonassoc .Config
assoc .pfm=pfmfile
assoc .pfx=PFXFile
assoc .pif=piffile
assoc .pjt=Visualassoc .FoxProassoc .Project
assoc .pjx=Visualassoc .FoxProassoc .Project
assoc .pklg=wireshark-capture-file
assoc .pko=PKOFile
assoc .pkt=wireshark-capture-file
assoc .pnf=pnffile
assoc .png=pngfile
assoc .pot=PowerPointassoc .Templateassoc .8
assoc .pothtml=powerpointhtmltemplate
assoc .potm=PowerPointassoc .TemplateMacroEnabledassoc .12
assoc .potx=PowerPointassoc .Templateassoc .12
assoc .ppa=PowerPointassoc .Addinassoc .8
assoc .ppam=PowerPointassoc .Addinassoc .12
assoc .ppdf=FoxitReaderassoc .PPDF
assoc .pps=PowerPointassoc .SlideShowassoc .8
assoc .ppsm=PowerPointassoc .SlideShowMacroEnabledassoc .12
assoc .ppsx=PowerPointassoc .SlideShowassoc .12
assoc .ppt=PowerPointassoc .Showassoc .8
assoc .ppthtml=powerpointhtmlfile
assoc .pptm=PowerPointassoc .ShowMacroEnabledassoc .12
assoc .pptmhtml=powerpointmhtmlfile
assoc .pptx=PowerPointassoc .Showassoc .12
assoc .pptxml=powerpointxmlfile
assoc .prf=prffile
assoc .prg=Visualassoc .FoxProassoc .Program
assoc .printerExport=brmFile
assoc .ps1=Microsoftassoc .PowerShellScriptassoc .1
assoc .ps1xml=Microsoftassoc .PowerShellXMLDataassoc .1
assoc .psc1=Microsoftassoc .PowerShellConsoleassoc .1
assoc .psd1=Microsoftassoc .PowerShellDataassoc .1
assoc .psm1=Microsoftassoc .PowerShellModuleassoc .1
assoc .pst=Outlookassoc .Fileassoc .pstassoc .14
assoc .pub=Publisherassoc .Documentassoc .14
assoc .pubhtml=publisherhtmlfile
assoc .pubmhtml=publishermhtmlfile
assoc .PurblePairsSave-ms=MicrosoftPurblePairsSaveFile
assoc .PurbleShopSave-ms=MicrosoftPurbleShopSaveFile
assoc .pwz=PowerPointassoc .Wizardassoc .8
assoc .py=Pythonassoc .File
assoc .pyc=Pythonassoc .CompiledFile
assoc .pyd=Pythonassoc .Extension
assoc .pyo=Pythonassoc .CompiledFile
assoc .pyw=Pythonassoc .NoConFile
assoc .pyz=Pythonassoc .ArchiveFile
assoc .pyzw=Pythonassoc .NoConArchiveFile
assoc .qds=SavedDsQuery
assoc .qlv=QQLiveassoc .qlv
assoc .qpr=Visualassoc .FoxProassoc .Query
assoc .qpx=Visualassoc .FoxProassoc .Query
assoc .r00=WinRAR
assoc .r01=WinRAR
assoc .r02=WinRAR
assoc .r03=WinRAR
assoc .r04=WinRAR
assoc .r05=WinRAR
assoc .r06=WinRAR
assoc .r07=WinRAR
assoc .r08=WinRAR
assoc .r09=WinRAR
assoc .r10=WinRAR
assoc .r11=WinRAR
assoc .r12=WinRAR
assoc .r13=WinRAR
assoc .r14=WinRAR
assoc .r15=WinRAR
assoc .r16=WinRAR
assoc .r17=WinRAR
assoc .r18=WinRAR
assoc .r19=WinRAR
assoc .r20=WinRAR
assoc .r21=WinRAR
assoc .r22=WinRAR
assoc .r23=WinRAR
assoc .r24=WinRAR
assoc .r25=WinRAR
assoc .r26=WinRAR
assoc .r27=WinRAR
assoc .r28=WinRAR
assoc .r29=WinRAR
assoc .rar=WinRAR
assoc .rat=ratfile
assoc .RDP=RDPassoc .File
assoc .reg=regfile
assoc .rels=xmlfile
assoc .resmoncfg=Diagnosticassoc .Resmonassoc .Config
assoc .rev=WinRARassoc .REV
assoc .rf5=wireshark-capture-file
assoc .rle=rlefile
assoc .rll=dllfile
assoc .rmi=WMP11assoc .AssocFileassoc .MIDI
assoc .rqy=rqyfile
assoc .rtf=Wordassoc .RTFassoc .8
assoc .scel=SogouCellDict
assoc .scf=SHCmdFile
assoc .scp=txtfile
assoc .scpf=SogouComponentPackageFile
assoc .scr=scrfile
assoc .sct=Visualassoc .FoxProassoc .Form
assoc .scx=Visualassoc .FoxProassoc .Form
assoc .sdf=Microsoft SQL Server Compact Edition Database File
assoc .search-ms=SearchFolder
assoc .searchConnector-ms=SearchConnectorFolder
assoc .sfcache=RDBFilePropertiesassoc .1
assoc .sldm=PowerPointassoc .SlideMacroEnabledassoc .12
assoc .sldx=PowerPointassoc .Slideassoc .12
assoc .slk=Excelassoc .SLK
assoc .slupkg-ms=MSSppPackageFile
assoc .snd=WMP11assoc .AssocFileassoc .AU
assoc .snoop=wireshark-capture-file
assoc .SolitaireSave-ms=MicrosoftSolitaireSaveFile
assoc .spc=SPCFile
assoc .SpiderSolitaireSave-ms=MicrosoftSpiderSolitaireSaveFile
assoc .spl=ShockwaveFlashassoc .ShockwaveFlash
assoc .srsf=SogouFlashwordStyle
assoc .ssf=SogouSkinFile
assoc .sso=SogouExtensionFile
assoc .sst=CertificateStoreFile
assoc .stl=STLFile
assoc .swf=ShockwaveFlashassoc .ShockwaveFlash
assoc .syc=wireshark-capture-file
assoc .sys=sysfile
assoc .tar=WinRAR
assoc .taz=WinRAR
assoc .tbf=Visualassoc .FoxProassoc .Offlineassoc .View
assoc .tbz=WinRAR
assoc .tbz2=WinRAR
assoc .tdx=Visualassoc .FoxProassoc .Offlineassoc .View
assoc .tgz=WinRAR
assoc .theme=themefile
assoc .themepack=themepackfile
assoc .thmx=OfficeThemeassoc .12
assoc .tif=TIFImageassoc .Document
assoc .tiff=TIFImageassoc .Document
assoc .tlz=WinRAR
assoc .tpc=wireshark-capture-file
assoc .tr1=wireshark-capture-file
assoc .trace=wireshark-capture-file
assoc .trc=wireshark-capture-file
assoc .TS=WMP11assoc .AssocFileassoc .TTS
assoc .ttc=ttcfile
assoc .ttf=ttffile
assoc .TTS=WMP11assoc .AssocFileassoc .TTS
assoc .txt=txtfile
assoc .txz=WinRAR
assoc .UDL=MSDASC
assoc .URL=InternetShortcut
assoc .uu=WinRAR
assoc .uue=WinRAR
assoc .UV2=UV2FILE
assoc .UVMPW=UVMPWFILE
assoc .UVPROJ=UVPROJFILE
assoc .uxdc=UXDCFILE
assoc .VBE=VBEFile
assoc .vbs=VBSFile
assoc .vcf=Outlookassoc .Fileassoc .vcfassoc .14
assoc .vcg=GrooveVCard
assoc .vcs=Outlookassoc .Fileassoc .vcsassoc .14
assoc .vct=Visualassoc .FoxProassoc .ClassLibrary
assoc .vcx=Visualassoc .FoxProassoc .ClassLibrary
assoc .vdx=VisioViewerassoc .Viewer
assoc .vmac=VMwareassoc .Document
assoc .vmba=VMwareassoc .Document
assoc .vmdk=VMwareassoc .VirtualDisk
assoc .vmpl=VMwareassoc .VMPolicy
assoc .vmsd=VMwareassoc .SnapshotMetadata
assoc .vmsn=VMwareassoc .Snapshot
assoc .vmss=VMwareassoc .SuspendState
assoc .vmt=VMwareassoc .Document
assoc .vmtm=VMwareassoc .TeamConfiguration
assoc .vmx=VMwareassoc .Document
assoc .vmxf=VMwareassoc .VMTeamMember
assoc .vsd=VisioViewerassoc .Viewer
assoc .vss=VisioViewerassoc .Viewer
assoc .vst=VisioViewerassoc .Viewer
assoc .vsto=bootstrapassoc .vstoassoc .1
assoc .vsx=VisioViewerassoc .Viewer
assoc .vtx=VisioViewerassoc .Viewer
assoc .vwr=wireshark-capture-file
assoc .vxd=vxdfile
assoc .wab=wab_auto_file
assoc .wav=WMP11assoc .AssocFileassoc .WAV
assoc .wax=WMP11assoc .AssocFileassoc .WAX
assoc .wbcat=wbcatfile
assoc .wbk=Wordassoc .Backupassoc .8
assoc .wcx=wcxfile
assoc .wdp=wdpfile
assoc .webpnp=webpnpFile
assoc .wgpf=WgSkinFile
assoc .wiz=Wordassoc .Wizardassoc .8
assoc .wizhtml=accessthmltemplate
assoc .wll=Wordassoc .Addinassoc .8
assoc .wm=WMP11assoc .AssocFileassoc .ASF
assoc .wma=WMP11assoc .AssocFileassoc .WMA
assoc .WMD=WMP11assoc .AssocFileassoc .WMD
assoc .wmdb=WMPassoc .WMDBFile
assoc .wmf=wmffile
assoc .WMS=WMP11assoc .AssocFileassoc .WMS
assoc .wmv=WMP11assoc .AssocFileassoc .WMV
assoc .wmx=WMP11assoc .AssocFileassoc .ASX
assoc .wmz=WMP11assoc .AssocFileassoc .WMZ
assoc .wnpf=WnSkinFile
assoc .wpc=wireshark-capture-file
assoc .wpl=WMP11assoc .AssocFileassoc .WPL
assoc .wpz=wireshark-capture-file
assoc .wsc=scriptletfile
assoc .WSF=WSFFile
assoc .WSH=WSHFile
assoc .WTV=MediaCenterassoc .WTVFile
assoc .wtx=txtfile
assoc .wvx=WMP11assoc .AssocFileassoc .WVX
assoc .xaml=Windowsassoc .XamlDocument
assoc .xbap=Windowsassoc .Xbap
assoc .xdp=FoxitReaderassoc .XDPDoc
assoc .xevgenxml=XEVassoc .GenericApp
assoc .xfdf=FoxitReaderassoc .XFDFDoc
assoc .xla=Excelassoc .Addin
assoc .xlam=Excelassoc .AddInMacroEnabled
assoc .xld=Excelassoc .Dialog
assoc .xlk=Excelassoc .Backup
assoc .xll=Excelassoc .XLL
assoc .xlm=Excelassoc .Macrosheet
assoc .xls=Excelassoc .Sheetassoc .8
assoc .xlsb=Excelassoc .SheetBinaryMacroEnabledassoc .12
assoc .xlshtml=Excelhtmlfile
assoc .xlsm=Excelassoc .SheetMacroEnabledassoc .12
assoc .xlsmhtml=excelmhtmlfile
assoc .xlsx=Excelassoc .Sheetassoc .12
assoc .xlt=Excelassoc .Templateassoc .8
assoc .xlthtml=Excelhtmltemplate
assoc .xltm=Excelassoc .TemplateMacroEnabled
assoc .xltx=Excelassoc .Template
assoc .xlw=Excelassoc .Workspace
assoc .xlxml=Excelxmlss
assoc .xml=xmlfile
assoc .xps=Windowsassoc .XPSReachViewer
assoc .xrm-ms=MSSppLicenseFile
assoc .xsf=InfoPathassoc .SolutionManifestassoc .3
assoc .xsl=xslfile
assoc .xsn=InfoPathassoc .Solutionassoc .3
assoc .xtp=XTPFile
assoc .xtp2=XTP2File
assoc .xxe=WinRAR
assoc .xz=WinRAR
assoc .z=WinRAR
assoc .zfsendtotarget=CLSID\{888DCA60-FC0A-11CF-8F0F-00C04FD7D062}
assoc .zip=WinRARassoc .ZIP
assoc .zipx=WinRAR



五、补充

之前修改了的打开方式要记得改回来,同时如果打开方式出现问题可以去注册表修改
注册表路径:\HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\WINDOWS\currentversion\Explorer\FileExts
同时切记,千万不要修改bat的打开方式,不然会导致改回后,将无法运行bat脚本。
如果改了bat的打开方式,要改回来去注册表删除除了openwithlist和openwithprogids 这两项外的其他所有选项。

本文章演示的是所有文件关联被打乱的情况,如果只有少部分文件关联出现问题运行上面bat脚本代码即可

原文链接

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

TKXS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值