快速命令或批处理脚本以确定Windows和Office版本 [英] quick command or batch script to determine Windows and Office version

查看:367
本文介绍了快速命令或批处理脚本以确定Windows和Office版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要对不属于同一网络或由同一公司拥有的300多台计算机进行软件审核.

I need to do a software audit of more than 300 computers that are neither on the same network, or owned by the same company.

是否存在可以通过电子邮件发送给最终用户以运行MS Windows和MS Office版本的命令或小程序(无需安装即可运行)?

Is there an command or small program (that can be run without installing) that I can email to the end-users to run that will output the MS Windows and MS Office versions?

推荐答案

获取当前Windows版本和Microsoft Office版本的一种可能方法是使用命令行查询系统注册表项.

One possible way of obtaining the current Windows Version and Microsoft Office version is to query the system registry entries using command line.

要使用系统注册表获取Windows版本,请使用以下命令:

To get the windows version using System registry , use the following command:

reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "ProductName"

这将提供一个输出,可以对其进行解析以获取当前的Windows版本/名称.

This will give an output which can be parsed to get the current windows version/name.

要获取当前的Office版本,请使用:

To get the current office version , use:

reg query "HKEY_CLASSES_ROOT\Word.Application\CurVer"

此命令的输出以数字格式(例如14、15等)提供Office版本.

The output of this command gives the office version in number format such as 14, 15, etc.

解析输出以获取版本号,并与现有Microsoft Office版本列表进行匹配以获取已安装版本的名称:

Parse the output to get the version number and match against the list of existing Microsoft office versions to get the name of the version installed:

Office 97   -  7.0
Office 98   -  8.0
Office 2000 -  9.0
Office XP   - 10.0
Office 2003 - 11.0
Office 2007 - 12.0
Office 2010 - 14.0 
Office 2013 - 15.0
Office 2016 - 16.0

希望这会有所帮助!

这篇关于快速命令或批处理脚本以确定Windows和Office版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆