C:\Users\Administrator>cmd /c assoc .png=MyCustomApp.Photo
.png=MyCustomApp.Photo
C:\Users\Administrator>cmd /c ftype MyCustomApp.Photo="D:\01-ruanjian\1234看图\2345Pic\2345PicViewer.exe" "%1"
MyCustomApp.Photo="D:\01-ruanjian\1234看图\2345Pic\2345PicViewer.exe" "%1"
C:\Users\Administrator>
-
cmd /c assoc .png=MyCustomApp.Photo 输出:.png=MyCustomApp.Photo
这表明您已经成功地将 .png 文件扩展名与自定义的 ProgID MyCustomApp.Photo 关联起来。
-
cmd /c ftype MyCustomApp.Photo=“D:\01-ruanjian\1234看图\2345Pic\2345PicViewer.exe” “%1” 输出:MyCustomApp.Photo=“D:\01-ruanjian\1234看图\2345Pic\2345PicViewer.exe” “%1”
这表明将 MyCustomApp.Photo ProgID 与指定的程序路径关联起来。
可以自由扩展到其他格式