I would like to have a batch file display which service pack it has installed, which internet explorer version it has installed, and which version of windows media player it has installed. This would be for windows xp only. The reason why I need this is because I have a script that can install windows updates offline but when it comes to service packs I dont always know which ones are installed so it would be nice to have the same batch file that can install the updates/service packs silently could also display what service packs are installed.
我想要一个批处理文件显示它安装了哪个Service Pack,它安装了哪个Internet Explorer版本,以及它安装了哪个版本的windows media player。这只适用于windows xp。我需要这个的原因是因为我有一个可以离线安装Windows更新的脚本,但是当涉及到服务包时,我不知道哪些安装了,所以最好有相同的批处理文件可以安装更新/静默服务包还可以显示安装的服务包。
2 个解决方案
#1
Here a VBS that will show which service packs are installed (From here):
这里有一个VBS,它将显示安装了哪些Service Pack(从这里开始):
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Next
#2
Review the systeminfo
command... it displays lots of useful system information.
查看systeminfo命令...它显示了许多有用的系统信息。
#1
Here a VBS that will show which service packs are installed (From here):
这里有一个VBS,它将显示安装了哪些Service Pack(从这里开始):
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Next
#2
Review the systeminfo
command... it displays lots of useful system information.
查看systeminfo命令...它显示了许多有用的系统信息。