Windows11 如何一次性对图片文件类型进行程序关联设置?系统已经没有了 Windows10 的图片默认应用程序设置功能了。

320 天前
 Apol1oBelvedere

Windows11 如何一次性对图片文件类型进行程序关联设置?

537 次点击
所在节点    问与答
7 条回复
0747916
320 天前
马克,我也想知道
ersic
320 天前
应用->默认应用,是说这里吗?
Apol1oBelvedere
320 天前
@ersic 自己操作一下再来看一遍题目!
ersic
320 天前
@Apol1oBelvedere 看了好几遍,我说的这可以选后缀然后选默认应用。
Apol1oBelvedere
320 天前
@ersic 一键对所有图片格式设置默认关联程序,图片后缀上百种,用后缀来设置不是完美的方法!!
732870147
320 天前
我也想知道,麻烦得很
israinbow
320 天前
什么方法都是一个一个的改,除非写脚本。

https://www.itechtics.com/set-default-apps/?expand_article=1

这是我拉屎的时候随手写的 pwsh 脚本:

# 设置打开方式
$exePath = "C:\path\to\photo.exe"
# 定义图片格式
$imageFormats = @(".jpg", ".png", ".gif")

foreach ($format in $imageFormats) {
$fileTypeKey = [Microsoft.Win32.Registry]::ClassesRoot.OpenSubKey($format, $true)
if ($fileTypeKey -ne $null) {
$fileTypeKey.SetValue("", $exePath)
$fileTypeKey.Close()
}
}

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/954540

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX