Skip to content

Instantly share code, notes, and snippets.

@simonid
Last active December 9, 2017 10:41
Show Gist options
  • Save simonid/77d7c56a7f973f0f17f8bbca6c405272 to your computer and use it in GitHub Desktop.
Save simonid/77d7c56a7f973f0f17f8bbca6c405272 to your computer and use it in GitHub Desktop.
Windows使用

Windows10常见问题

关于系统自动升级

Win10的Delivery Optimization占用流量

这是一个系统自动更新的下载补丁,在用户关闭了自动更新的服务后依旧会偷跑,需要下面简单设置

  1. 点击右下角网络图标,打开“网络和Internet设置”
  2. 点击“更改网络属性”
  3. 打开“设为按流量计费的连接”
打开powershell,执行下面的命令:
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize
执行这条命令之后窗口会输出很多程序的清单信息,包括了应用名、应用发布者、应用版本、应用安装时间。
上述的命令只是简单把程序清单输出到窗口,如果需要重定向到一个文件中,可以执行:
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > E:\Windows-APP-Backup.txt
执行完成后就输出一个txt文件,内容是应用清单
同时,如果要比较两台机器的应用清单,可以执行类似:
Compare-Object -ReferenceObject (Get-Content C:\Users\Lori\Documents\PCapps.txt) -DifferenceObject (Get-Content C:\Users\Lori\Documents\LAPTOPapps.txt)
实际上,上述的命令是通过检查Windows的注册表信息来达到目的的,也可以使用这样的命令:
Get-WmiObject -Class Win32_Product -ComputerName . > E:\Windows-APP-Backup.txt
由于部分程序的并没有在注册表上有信息,所以一些程序是实际上找不到的,比如一些简单的exe文件。而且,如果卸载不干净,
参考自:https://www.howtogeek.com/165293/how-to-get-a-list-of-software-installed-on-your-pc-with-a-single-command/
https://docs.microsoft.com/zh-cn/powershell/scripting/getting-started/cookbooks/working-with-software-installations?view=powershell-5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment