PowerShell查看本机文件关联程序和默认打开程序的方法

798 查看

上次转载的一篇文章《PowerShell查看打开文件的默认应用程序》,它的亮点是调用了windows api,思路很独特,但是未必实用。后来@J在原文中评论,说assoc + ftype更方便。那么assoc 和 ftype是个神马东西,我简单描述下。

assoc 和 ftype是windows系统上cmd.exe中两个命令:

前者assoc 可以返回文件扩展名(比如.mp3)和系统对该扩展名本身的命名(比如WMP11.AssocFile.MP3)。
后者 ftype 可以返回系统的扩展名命名(比如WMP11.AssocFile.MP3)和默认的打开程序(比如:windows媒体播放器的程序路径,及可接受的参数)。
有了上面的知识和工具我们就可以大言不惭地在PowerShell中调用cmd中的命令,并显示所有的扩展名,和扩展名文件对应的默认打开程序。体现PowerShell强大兼容性的时刻又一次到来了:

复制代码 代码如下:

$ftypeMap = @{}
cmd /c ftype  | foreach {
    $FileType,$Executable= $_ -split '='
    $ftypeMap.Add($FileType,$Executable)
}
 
cmd /c assoc | foreach {
    $Extension,$FileType = $_ -split '='
    [pscustomobject]@{
        Extension = $Extension
        FileType = $FileType
        Executable=$ftypeMap[$FileType]
    }
} | Out-GridView
 
Remove-Variable -Name ftypeMap

PowerShell查看文件关联和默认打开程序

所以我们在和PowerShell这个新欢相处时,也不要把旧爱完全忘记啊。

我把上面的脚本稍加改动,在自己机器上生成了一个html表格:

文件后缀 文件扩展名 默认打开程序
.386 vxdfile
.3g2 WMP11.AssocFile.3G2 “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gp WMP11.AssocFile.3GP “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gp2 WMP11.AssocFile.3G2 “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gpp WMP11.AssocFile.3GP “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.aac WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.accda Access.ACCDAExtension.15 D:\PROGRA~2\MICROS~1\Office15\MSACCESS.EXE /NOSTARTUP “%1″
.accdb Access.Application.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdc Access.ACCDCFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accde Access.ACCDEFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdr Access.ACCDRFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /RUNTIME “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdt Access.ACCDTFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accdu Access.WizardUserDataFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accdw Access.WebApplicationReference.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accessor VisualStudio.accessor.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.accft Access.ACCFTFile.15
.accountpicture-ms accountpicturefile
.acl ACLFile
.actions4 .actions4
.activitydiagram VisualStudio.activitydiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.AddIn VisualStudio.AddIn.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ade Access.ADEFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.adn Access.BlankProjectTemplate.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP /NEWDB “%1″
.adp Access.Project.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.adt WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.adts WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.AIF WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AIFC WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AIFF WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.ani anifile
.apk apkfile d:\Program Files (x86)\ROMasterLab\ApkInstaller.exe %1
.appcontent-ms ApplicationContent
.application Application.Manifest “C:\Windows\System32\rundll32.exe” “C:\Windows\System32\dfshim.dll”,ShOpenVerbApplication %1
.appref-ms Application.Reference “C:\Windows\System32\rundll32.exe” “C:\Windows\System32\dfshim.dll”,ShOpenVerbShortcut %1|%2
.appxmanifest VisualStudio.appxmanifest.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.asa aspfile
.asax VisualStudio.asax.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ascx VisualStudio.ascx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ASF WMP11.AssocFile.ASF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:7 /Open “%L”
.ashx VisualStudio.ashx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asm VisualStudio.asm.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asmx VisualStudio.asmx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asp aspfile
.aspx VisualStudio.aspx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ASX WMP11.AssocFile.ASX “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AU WMP11.AssocFile.AU “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.avi WMP11.AssocFile.AVI “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:8 /Open “%L”
.avs avsfile notepad.exe “%1″
.avsi avs_auto_file notepad.exe “%1″
.aw AWFile
.bat batfile “%1″ %*
.bdcm VisualStudio.bdcm.10.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.bdcr VisualStudio.bdcr.10.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.blg Diagnostic.Perfmon.Document %SystemRoot%\system32\perfmon /sys /open “%1″
.bmp Paint.Picture %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.bsc VisualStudio.bsc.12.0
.c VisualStudio.c.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cab CABFolder %SystemRoot%\Explorer.exe /idlist,%I,%L
.camp campfile
.cat CATFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCAT %1
.cc VisualStudio.cc.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ccproj VisualStudio.ccproj.1.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.cd VisualStudio.cd.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.CDA WMP11.AssocFile.CDA “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.cdmp cdmpfile
.cdx aspfile
.cdxml Microsoft.PowerShellCmdletDefinitionXML.1
.cer CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.chk chkfile
.chm chm.file “%SystemRoot%\hh.exe” %1
.classdiagram VisualStudio.classdiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.cmd cmdfile “%1″ %*
.cod VisualStudio.cod.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.coffee VisualStudio.coffee.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.com comfile “%1″ %*
.componentdiagram VisualStudio.componentdiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.compositefont Windows.CompositeFont “%SystemRoot%\System32\notepad.exe” “%1″
.config VisualStudio.config.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.contact contact_wab_auto_file “%ProgramFiles%\Windows Mail\wab.exe” /contact “%1″
.coverage VisualStudio.coverage.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.coveragexml VisualStudio.coveragexml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cpl cplfile
.cpp VisualStudio.cpp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.crl CRLFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCRL %1
.crt CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.crtx CRTXFile
.cs VisualStudio.cs.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cscfg VisualStudio.cscfg.1.0
.csdef VisualStudio.csdef.1.0
.cshtml VisualStudio.cshtml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cspkg VisualStudio.cspkg.1.0
.csproj VisualStudio.Launcher.csproj.12.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.css CSSfile
.csv Excel.CSV “D:\Program Files\Microsoft Office\Office15\EXCEL.EXE” /dde
.cur curfile
.cxx VisualStudio.cxx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dacpac ssms.dacpac.11.0
.datasource VisualStudio.datasource.12.0
.db dbfile
.dbml VisualStudio.ORDesigner.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dctx IMEDictionaryCompiler “%WINDIR%\system32\IME\SHARED\imewdbld.exe” “%1″ %*
.dctxc IMEDictionaryCompiler “%WINDIR%\system32\IME\SHARED\imewdbld.exe” “%1″ %*
.dds ddsfile
.def VisualStudio.def.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.der CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.desklink CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}
.deskthemepack desktopthemepackfile %SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\themecpl.dll,OpenThemeAction %1
.det Outlook.File.det.15
.dgml VisualStudio.dgml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dgsl VisualStudio.dgsl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.diagcab Diagnostic.Cabinet %SystemRoot%\system32\msdt.exe /cab “%1″
.diagcfg Diagnostic.Config %SystemRoot%\system32\msdt.exe /path “%1″
.diagpkg Diagnostic.Document %SystemRoot%\system32\msdt.exe /path “%1″
.diagsession VisualStudio.diagsession.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dib Paint.Picture %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.dic txtfile %SystemRoot%\system32\NOTEPAD.EXE %1
.disco VisualStudio.disco.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dll dllfile
.dmp VisualStudio.dmp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.doc Word.Document.8 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dochtml wordhtmlfile “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE”
.docm Word.DocumentMacroEnabled.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.docmhtml wordmhtmlfile
.docx Word.Document.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.docxml wordxmlfile
.dot Word.Template.8 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dothtml wordhtmltemplate “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE”
.dotm Word.TemplateMacroEnabled.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dotx Word.Template.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dqy dqyfile D:\PROGRA~2\MICROS~1\Office15\EXCEL.EXE
.drv drvfile
.dsn MSDASQL
.dsp VisualStudio.dsp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dsw VisualStudio.dsw.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dtd VisualStudio.dtd.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dwfx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.easmx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.ect VisualStudio.SharePoint.ect.11.0
.edmx VisualStudio.edmx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.edrwx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.elm ELMFile
.emf emffile “%systemroot%\system32\mspaint.exe” “%1″
.eml Outlook.File.eml.15 D:\PROGRA~2\MICROS~1\Office15\OUTLOOK.EXE /eml “%1″
.eprtx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.etl wpa.etl_file C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\wpa.exe “%1″
.evt evtfile %SystemRoot%\system32\eventvwr.exe /l:”%1″
.evtx evtxfile %SystemRoot%\system32\eventvwr.exe /l:”%1″
.exc txtfile %SystemRoot%\system32\NOTEPAD.EXE %1
.exe exefile “%1″ %*
.exp VisualStudio.exp.12.0
.fbx VisualStudio.fbx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fdm Outlook.File.fdm.15
.feature VisualStudio.SharePoint.feature.11.0
.feedback Expression.SketchFlow.feedback.12.0
.filters VisualStudio.vcxproj.filters.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.flow Expression.SketchFlow.flow.12.0
.fon fonfile
.fs VisualStudio.fs.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsi VisualStudio.fsi.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsproj VisualStudio.Launcher.fsproj.12.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.fsscript VisualStudio.fsscript.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsx VisualStudio.fsx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fx VisualStudio.fx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.gcsx GCSXFile
.generictest VisualStudio.generictest.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.gif giffile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.glox GLOXFile
.gmmp gmmpfile
.gqsx GQSXFile
.gra MSGraph.Chart.8
.group group_wab_auto_file “%ProgramFiles%\Windows Mail\wab.exe” /Group “%1″
.grp MSProgramGroup
.h VisualStudio.h.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hdmp VisualStudio.hdmp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.hh VisualStudio.hh.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hlp hlpfile %SystemRoot%\winhlp32.exe %1
.hlsl VisualStudio.hlsl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hlsli VisualStudio.hlsli.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hol Outlook.File.hol.15 “D:\Program Files\Microsoft Office\Office15\OUTLOOK.EXE” /hol “%1″
.hpp VisualStudio.hpp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hta htafile C:\Windows\SysWOW64\mshta.exe “%1″ {1E460BD7-F1C3-4B2E-88BF-4E770A288AF5}%U{1E460BD7-F1C3-4B2E-88BF-4E770A288AF5} %*
.htm htmlfile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.html htmlfile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.hxa MSHelp.hxa.2.5
.hxc MSHelp.hxc.2.5
.hxd MSHelp.hxd.2.5
.hxe MSHelp.hxe.2.5
.hxf MSHelp.hxf.2.5
.hxh MSHelp.hxh.2.5
.hxi MSHelp.hxi.2.5
.hxk MSHelp.hxk.2.5
.hxq MSHelp.hxq.2.5
.hxr MSHelp.hxr.2.5
.hxs MSHelp.hxs.2.5
.hxt MSHelp.hxt.2.5
.hxv MSHelp.hxv.2.5
.hxw MSHelp.hxa.2.5
.hxx VisualStudio.hxx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.i VisualStudio.i.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.icc icmfile
.icl IconLibraryFile
.icm icmfile
.ico icofile %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.ics Outlook.File.ics.15 “D:\Program Files\Microsoft Office\Office15\OUTLOOK.EXE” /ical “%1″
.idb VisualStudio.idb.12.0
.idl VisualStudio.idl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ilk VisualStudio.ilk.12.0
.imesx imesxfile “%WINDIR%\system32\IME\SHARED\imesearch.exe” “%1″
.img Windows.IsoFile
.inc VisualStudio.inc.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.inf inffile %SystemRoot%\system32\NOTEPAD.EXE %1
.infopathxml InfoPath.Document.4 “D:\Program Files\Microsoft Office\Office15\INFOPATH.EXE” “%1″
.ini inifile %SystemRoot%\system32\NOTEPAD.EXE %1
.inl VisualStudio.inl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.iqy iqyfile D:\PROGRA~2\MICROS~1\Office15\EXCEL.EXE /dde
.iso Windows.IsoFile
.iTrace VisualStudio.itrace.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.IVF IVFfile RunDll32.exe C:\Windows\SysWOW64\wmpdxm.dll,RunDll /play %1
.jfif pjpegfile %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscree 后者 ftype 可以返回系统的扩展名命名(比如WMP11.AssocFile.MP3)和默认的打开程序(比如:windows媒体播放器的程序路径,及可接受的参数)。
有了上面的知识和工具我们就可以大言不惭地在PowerShell中调用cmd中的命令,并显示所有的扩展名,和扩展名文件对应的默认打开程序。体现PowerShell强大兼容性的时刻又一次到来了:

复制代码 代码如下:

$ftypeMap = @{}
cmd /c ftype  | foreach {
    $FileType,$Executable= $_ -split '='
    $ftypeMap.Add($FileType,$Executable)
}
 
cmd /c assoc | foreach {
    $Extension,$FileType = $_ -split '='
    [pscustomobject]@{
        Extension = $Extension
        FileType = $FileType
        Executable=$ftypeMap[$FileType]
    }
} | Out-GridView
 
Remove-Variable -Name ftypeMap

PowerShell查看文件关联和默认打开程序

所以我们在和PowerShell这个新欢相处时,也不要把旧爱完全忘记啊。

我把上面的脚本稍加改动,在自己机器上生成了一个html表格:

文件后缀 文件扩展名 默认打开程序
.386 vxdfile
.3g2 WMP11.AssocFile.3G2 “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gp WMP11.AssocFile.3GP “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gp2 WMP11.AssocFile.3G2 “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.3gpp WMP11.AssocFile.3GP “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.aac WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.accda Access.ACCDAExtension.15 D:\PROGRA~2\MICROS~1\Office15\MSACCESS.EXE /NOSTARTUP “%1″
.accdb Access.Application.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdc Access.ACCDCFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accde Access.ACCDEFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdr Access.ACCDRFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /RUNTIME “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accdt Access.ACCDTFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accdu Access.WizardUserDataFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″
.accdw Access.WebApplicationReference.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.accessor VisualStudio.accessor.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.accft Access.ACCFTFile.15
.accountpicture-ms accountpicturefile
.acl ACLFile
.actions4 .actions4
.activitydiagram VisualStudio.activitydiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.AddIn VisualStudio.AddIn.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ade Access.ADEFile.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.adn Access.BlankProjectTemplate.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP /NEWDB “%1″
.adp Access.Project.15 “D:\Program Files\Microsoft Office\Office15\MSACCESS.EXE” /NOSTARTUP “%1″ %2 %3 %4 %5 %6 %7 %8 %9
.adt WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.adts WMP11.AssocFile.ADTS “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:6 /Open “%L”
.AIF WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AIFC WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AIFF WMP11.AssocFile.AIFF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.ani anifile
.apk apkfile d:\Program Files (x86)\ROMasterLab\ApkInstaller.exe %1
.appcontent-ms ApplicationContent
.application Application.Manifest “C:\Windows\System32\rundll32.exe” “C:\Windows\System32\dfshim.dll”,ShOpenVerbApplication %1
.appref-ms Application.Reference “C:\Windows\System32\rundll32.exe” “C:\Windows\System32\dfshim.dll”,ShOpenVerbShortcut %1|%2
.appxmanifest VisualStudio.appxmanifest.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.asa aspfile
.asax VisualStudio.asax.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ascx VisualStudio.ascx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ASF WMP11.AssocFile.ASF “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:7 /Open “%L”
.ashx VisualStudio.ashx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asm VisualStudio.asm.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asmx VisualStudio.asmx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.asp aspfile
.aspx VisualStudio.aspx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ASX WMP11.AssocFile.ASX “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.AU WMP11.AssocFile.AU “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.avi WMP11.AssocFile.AVI “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /prefetch:8 /Open “%L”
.avs avsfile notepad.exe “%1″
.avsi avs_auto_file notepad.exe “%1″
.aw AWFile
.bat batfile “%1″ %*
.bdcm VisualStudio.bdcm.10.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.bdcr VisualStudio.bdcr.10.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.blg Diagnostic.Perfmon.Document %SystemRoot%\system32\perfmon /sys /open “%1″
.bmp Paint.Picture %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.bsc VisualStudio.bsc.12.0
.c VisualStudio.c.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cab CABFolder %SystemRoot%\Explorer.exe /idlist,%I,%L
.camp campfile
.cat CATFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCAT %1
.cc VisualStudio.cc.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ccproj VisualStudio.ccproj.1.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.cd VisualStudio.cd.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.CDA WMP11.AssocFile.CDA “%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe” /Open “%L”
.cdmp cdmpfile
.cdx aspfile
.cdxml Microsoft.PowerShellCmdletDefinitionXML.1
.cer CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.chk chkfile
.chm chm.file “%SystemRoot%\hh.exe” %1
.classdiagram VisualStudio.classdiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.cmd cmdfile “%1″ %*
.cod VisualStudio.cod.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.coffee VisualStudio.coffee.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.com comfile “%1″ %*
.componentdiagram VisualStudio.componentdiagram.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde “%1″
.compositefont Windows.CompositeFont “%SystemRoot%\System32\notepad.exe” “%1″
.config VisualStudio.config.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.contact contact_wab_auto_file “%ProgramFiles%\Windows Mail\wab.exe” /contact “%1″
.coverage VisualStudio.coverage.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.coveragexml VisualStudio.coveragexml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cpl cplfile
.cpp VisualStudio.cpp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.crl CRLFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCRL %1
.crt CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.crtx CRTXFile
.cs VisualStudio.cs.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cscfg VisualStudio.cscfg.1.0
.csdef VisualStudio.csdef.1.0
.cshtml VisualStudio.cshtml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.cspkg VisualStudio.cspkg.1.0
.csproj VisualStudio.Launcher.csproj.12.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.css CSSfile
.csv Excel.CSV “D:\Program Files\Microsoft Office\Office15\EXCEL.EXE” /dde
.cur curfile
.cxx VisualStudio.cxx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dacpac ssms.dacpac.11.0
.datasource VisualStudio.datasource.12.0
.db dbfile
.dbml VisualStudio.ORDesigner.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dctx IMEDictionaryCompiler “%WINDIR%\system32\IME\SHARED\imewdbld.exe” “%1″ %*
.dctxc IMEDictionaryCompiler “%WINDIR%\system32\IME\SHARED\imewdbld.exe” “%1″ %*
.dds ddsfile
.def VisualStudio.def.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.der CERFile %SystemRoot%\system32\rundll32.exe cryptext.dll,CryptExtOpenCER %1
.desklink CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}
.deskthemepack desktopthemepackfile %SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\themecpl.dll,OpenThemeAction %1
.det Outlook.File.det.15
.dgml VisualStudio.dgml.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dgsl VisualStudio.dgsl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.diagcab Diagnostic.Cabinet %SystemRoot%\system32\msdt.exe /cab “%1″
.diagcfg Diagnostic.Config %SystemRoot%\system32\msdt.exe /path “%1″
.diagpkg Diagnostic.Document %SystemRoot%\system32\msdt.exe /path “%1″
.diagsession VisualStudio.diagsession.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dib Paint.Picture %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.dic txtfile %SystemRoot%\system32\NOTEPAD.EXE %1
.disco VisualStudio.disco.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dll dllfile
.dmp VisualStudio.dmp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.doc Word.Document.8 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dochtml wordhtmlfile “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE”
.docm Word.DocumentMacroEnabled.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.docmhtml wordmhtmlfile
.docx Word.Document.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.docxml wordxmlfile
.dot Word.Template.8 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dothtml wordhtmltemplate “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE”
.dotm Word.TemplateMacroEnabled.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dotx Word.Template.12 “D:\Program Files\Microsoft Office\Office15\WINWORD.EXE” /n “%1″ /o “%u”
.dqy dqyfile D:\PROGRA~2\MICROS~1\Office15\EXCEL.EXE
.drv drvfile
.dsn MSDASQL
.dsp VisualStudio.dsp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dsw VisualStudio.dsw.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.dtd VisualStudio.dtd.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.dwfx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.easmx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.ect VisualStudio.SharePoint.ect.11.0
.edmx VisualStudio.edmx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.edrwx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.elm ELMFile
.emf emffile “%systemroot%\system32\mspaint.exe” “%1″
.eml Outlook.File.eml.15 D:\PROGRA~2\MICROS~1\Office15\OUTLOOK.EXE /eml “%1″
.eprtx Windows.XPSReachViewer %SystemRoot%\System32\xpsrchvw.exe “%1″ %*
.etl wpa.etl_file C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\wpa.exe “%1″
.evt evtfile %SystemRoot%\system32\eventvwr.exe /l:”%1″
.evtx evtxfile %SystemRoot%\system32\eventvwr.exe /l:”%1″
.exc txtfile %SystemRoot%\system32\NOTEPAD.EXE %1
.exe exefile “%1″ %*
.exp VisualStudio.exp.12.0
.fbx VisualStudio.fbx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fdm Outlook.File.fdm.15
.feature VisualStudio.SharePoint.feature.11.0
.feedback Expression.SketchFlow.feedback.12.0
.filters VisualStudio.vcxproj.filters.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.flow Expression.SketchFlow.flow.12.0
.fon fonfile
.fs VisualStudio.fs.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsi VisualStudio.fsi.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsproj VisualStudio.Launcher.fsproj.12.0 “C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe” “%1″
.fsscript VisualStudio.fsscript.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fsx VisualStudio.fsx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.fx VisualStudio.fx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.gcsx GCSXFile
.generictest VisualStudio.generictest.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.gif giffile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.glox GLOXFile
.gmmp gmmpfile
.gqsx GQSXFile
.gra MSGraph.Chart.8
.group group_wab_auto_file “%ProgramFiles%\Windows Mail\wab.exe” /Group “%1″
.grp MSProgramGroup
.h VisualStudio.h.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hdmp VisualStudio.hdmp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.hh VisualStudio.hh.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hlp hlpfile %SystemRoot%\winhlp32.exe %1
.hlsl VisualStudio.hlsl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hlsli VisualStudio.hlsli.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hol Outlook.File.hol.15 “D:\Program Files\Microsoft Office\Office15\OUTLOOK.EXE” /hol “%1″
.hpp VisualStudio.hpp.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.hta htafile C:\Windows\SysWOW64\mshta.exe “%1″ {1E460BD7-F1C3-4B2E-88BF-4E770A288AF5}%U{1E460BD7-F1C3-4B2E-88BF-4E770A288AF5} %*
.htm htmlfile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.html htmlfile “C:\Program Files\Internet Explorer\iexplore.exe” %1
.hxa MSHelp.hxa.2.5
.hxc MSHelp.hxc.2.5
.hxd MSHelp.hxd.2.5
.hxe MSHelp.hxe.2.5
.hxf MSHelp.hxf.2.5
.hxh MSHelp.hxh.2.5
.hxi MSHelp.hxi.2.5
.hxk MSHelp.hxk.2.5
.hxq MSHelp.hxq.2.5
.hxr MSHelp.hxr.2.5
.hxs MSHelp.hxs.2.5
.hxt MSHelp.hxt.2.5
.hxv MSHelp.hxv.2.5
.hxw MSHelp.hxa.2.5
.hxx VisualStudio.hxx.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.i VisualStudio.i.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.icc icmfile
.icl IconLibraryFile
.icm icmfile
.ico icofile %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscreen %1
.ics Outlook.File.ics.15 “D:\Program Files\Microsoft Office\Office15\OUTLOOK.EXE” /ical “%1″
.idb VisualStudio.idb.12.0
.idl VisualStudio.idl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.ilk VisualStudio.ilk.12.0
.imesx imesxfile “%WINDIR%\system32\IME\SHARED\imesearch.exe” “%1″
.img Windows.IsoFile
.inc VisualStudio.inc.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.inf inffile %SystemRoot%\system32\NOTEPAD.EXE %1
.infopathxml InfoPath.Document.4 “D:\Program Files\Microsoft Office\Office15\INFOPATH.EXE” “%1″
.ini inifile %SystemRoot%\system32\NOTEPAD.EXE %1
.inl VisualStudio.inl.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /dde
.iqy iqyfile D:\PROGRA~2\MICROS~1\Office15\EXCEL.EXE /dde
.iso Windows.IsoFile
.iTrace VisualStudio.itrace.12.0 “D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” “%1″
.IVF IVFfile RunDll32.exe C:\Windows\SysWOW64\wmpdxm.dll,RunDll /play %1
.jfif pjpegfile %SystemRoot%\System32\rundll32.exe “%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll”, ImageView_Fullscree PowerPoint.Addin.12 “D:\Program Files\Microsoft Office\Office15\POWERPNT.EXE” “%1″ /ou “%u”