因为手痒在系统里删除了notepad,然后在系统store里点安装notepad,点了没反应了,真是作死。
研究了一番,找到了以下命令行模式重新添加notepad,安装需要网络连接。
dism /Online /add-Capability /CapabilityName:Microsoft.Windows.Notepad.System~~~~0.0.1.0
运行以上命令行就可以添加消失的notepad
PS C:\Users\M> dism /Online /add-Capability /CapabilityName:Microsoft.Windows.Notepad.System~~~~0.0.1.0 Deployment Image Servicing and Management tool Version: 10.0.22000.1 Image Version: 10.0.22000.348 [==========================100.0%==========================] The operation completed successfully. Restart Windows to complete this operation. Do you want to restart the computer now? (Y/N) Y
然后重启电脑就OK了。
希望可以帮助到需要的人,参考资料如下:
https://windowsloop.com/how-to-fix-missing-notepad-in-windows-reinstall-notepad/