ospp.vbs是什么文件?激活过程cscript ospp.vbs命令详解

mahocon 2021-12-08 原文

ospp.vbs是什么文件?激活过程cscript ospp.vbs命令详解

  在Office 2013激活过程中我们经常会用到cscript ospp.vbs这个命令。那么,很有必要来了解一下,ospp.vbs到底是什么文件?Cscript.exe是脚本运行引擎,这里就不多介绍了。ospp全称为:Office Software Protection Platform,vbs大家都知道是脚本文件,所以得出结论,ospp.vbs就是:Office软件保护平台脚本。它是目前Office自身提供的激活管理工具。

ospp.vbs文件在哪里?

该脚本位于%安装目录%\ Program Files文件\微软Office \ Office15文件夹中。如果您运行的是32位Office 2013的64位操作系统,该脚本位于%安装目录%\程序文件(x86)\微软Office \ Office15文件夹中。

ospp.vbs命令介绍

命令有很多,不一一全部介绍了,说说几个激活过程中的常用命令。为了让大家看得更明白,下面我以我虚拟机里的Office 2003 Pro Plus做个演示。

ospp.vbs

cscript ospp.vbs /dstatus

显示当前已安装产品密钥的许可证信息。可以查看到自已安裝的版本有多少个序列号。

ospp.vbs

cscript ospp.vbs /unpkey:xxxxx

卸载已安装的产品密钥。后面的数字是密钥的最后5位数。

此时再执行cscript ospp.vbs /dstatus发现产品密钥已经没有了,我重新进行导入。

ospp.vbs

cscript ospp.vbs /inpkey:xxxxx……
安装、替换现有的产品密钥。和上面的过程刚好相反。

cscript ospp.vbs /sethst:x.x.x.x
设置KMS主机名。一般为IP地址。

cscript ospp.vbs /act
激活当前安装的Office。

cscript ospp.vbs /remhst
删除KMS主机名。

一般来说掌握这么几个就可以了,如果你想要全面了解,我从微软官方网站上找到了全部的命令帮助说明,慢慢学习研究吧!

Global options for ospp.vbs

/act Activates installed Office 2013 product keys.
/inpkey:value Installs a product key (replaces existing key) with user-provided product key. Value option is required.
/unpkey:value Uninstalls an installed product key with the last five digits of the product key to uninstall (as displayed by the /dstatus option). Value parameter is required.
/inslic:value Installs a license with user-provided path of the .xrm-ms license. Value parameter is required.
/dstatus Displays license information for installed product keys.
/dstatusall Displays license information for all installed licenses.
/dhistoryacterr Displays the failure history for MAK/Retail activation.
/dinstid Displays Installation ID for offline activation.
/actcid:value Activates product with user-provided Confirmation ID. Value parameter is required.
/rearm Resets the licensing status for all installed Office 2013 product keys.
/rearm:value Resets the licensing status for an Office 2013 license with a user-provided SKUID value. Value parameter is required.
Use this option with the SKUID value specified by using the /dstatus option if you have run out of rearms and have activated Office through KMS or AD-based activation to gain an additional rearm.
/ddescr:value Displays the description for a user-provided error code. Value parameter is required.

KMS client options for ospp.vbs

/dhistorykms Displays KMS client activation history.
/dcmid Displays KMS client machine ID (CMID).
/sethst:value Sets a KMS host name with a user-provided host name. Value parameter is required.
This sets HKLM\Software\Microsoft\OfficeSoftwareProtectionPlatform\KeyManagementServiceName (REG_SZ).
/setprt:value Sets a KMS port with a user-provided port number. Value parameter is required.
This sets HKLM\Software\Microsoft\OfficeSoftwareProtectionPlatform\KeyManagementServicePort (REG_SZ).
/remhst Removes KMS host name (sets port to default).
/cachst:value Allows or denies KMS host caching. Value parameter is required (TRUE or FALSE).
/actype:value (Windows 8 and newer versions only) Sets volume activation type. Value parameter is required.
Values: 1 (for Active Directory-Based), 2 (for KMS). 0 (for both).
/skms-domain:value (Windows 8 and newer versions only) Sets the specific DNS domain in which all KMS SRV records can be found. This setting has no effect if the specific single KMS host is set by the /sethst option. Value parameter is the Fully Qualified Domain Name (FQDN) and is required.
/ckms-domain (Windows 8 and newer versions only) Clears the specific DNS domain in which all KMS SRV records can be found. The specific KMS host is used if it is set by the /sethst option. Otherwise, auto-discovery of the KMS host is used.

用在线Google翻译如下。机器翻译肯定不会很通顺,不过能大慨看懂。

全局命令

/ ACT 激活安装的Office 2013产品密钥。
/ inpkey:值 用户提供的产品密钥安装产品密钥(替换现有密钥)。值选项是必需的。
/ unpkey:值 卸载已安装的产品密钥的最后5位数字的产品密钥卸载(显示的/ dstatus选项)。Value参数是必需的。
/ inslic:值 安装许可证的。XRM-MS许可证的用户提供的路径。Value参数是必需的。
/ dstatus 显示已安装的产品密钥的许可证信息。
/ dstatusall 显示所有已安装许可证的许可信息。
/ dhistoryacterr 显示的故障历史记录的MAK /零售激活。
/ dinstid 显示安装ID为脱机激活。
/ actcid:值 用户提供的确认ID激活产品。Value参数是必需的。
/重新武装 复位的授权状态,所有已安装的Office 2013产品密钥。
/重整价值 重设许可状态的Office 2013许可证与用户提供SKUID的价值。Value参数是必需的。
使用此选项指定的值通过使用的/ dstatus选项,如果你有用完的重新激活和已激活的Office通过KMS或基于AD-激活的获得额外的重新武装SKUID 。
/ ddescr:值 显示为用户提供的错误代码的描述。Value参数是必需的。

KMS客户端的命令

/ dhistorykms 显示KMS客户端激活历史记录。
/ dcmid 显示KMS客户端计算机ID(CMID)。
/ sethst:值 设置KMS主机名和用户提供的主机名。Value参数是必需的。
此设置HKLM \软件\微软\ OfficeSoftwareProtectionPlatform \ KeyManagementServiceName(REG_SZ)。
/ setprt:值 设置KMS端口与用户提供的端口号。Value参数是必需的。
此设置HKLM \软件\微软\ OfficeSoftwareProtectionPlatform \ KeyManagementServicePort(REG_SZ)。
/ remhst 删除KMS主机名(将端口设置为默认)。
/ cachst:值 允许或拒绝KMS主机缓存。Value参数是必需的(TRUE或FALSE)。
/ actype:值 (Windows 8和较新的版本只)设置批量激活的类型。Value参数是必需的。
值:1(基于Active Directory),2(KMS)。0(两个)。
/ SKMS域值 (Windows 8和较新的版本只)设置特定的DNS域的所有KMS SRV记录可以发现。如果特定的单一KMS主机的/ sethst选项,该设置没有任何影响。Value参数是完全合格的域名称(FQDN)是必需的。
/ CKMS域 (Windows 8和较新的版本只)清除所有KMS SRV记录可以发现特定的DNS域名。使用特定的KMS主机,如果它被设置的/ sethst选项。否则,自动发现使用的KMS主机。

版权声明:本文为mahocon原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/mahocon/p/8615210.html

ospp.vbs是什么文件?激活过程cscript ospp.vbs命令详解的更多相关文章

随机推荐

  1. [十五]java.math包简介,RoundingMode与MathContext

    java.math包提供了java中的数学类 包括基本的浮点库、复杂运算以及任意精度的数据运算   ̵ […]...

  2. 红黑树——以无厚入有间(插入)

    首先说一下,关于红黑树有一篇很棒的论文《A dichromatic framework for balance […]...

  3. Android学习进度二

    在最新的Android开发中,Google已经使用了新的开发技术,即使用Jectpack来开发App。所以今天 […]...

  4. Tongue Twister-快速集成华为实时语音识别服务玩转绕口令

    前言 实不相瞒,小编作为了一个湖南人,时常被说普通话不够标准,不仅N/L不分,有时候还分不出来卷舌音,经常闹笑 […]...

  5. 老板:把系统从单体架构升级到集群架构!

    首发于公众号:BiggerBoy 如题,本文针对工作中实际经验,整理了把一个单体架构的系统升级成集群架构需要做 […]...

  6. HTML4与HTML5中label标签的不同用法

    label 标签:用来将文字和单选或者多选按钮进行绑定。 html4中label标签需要通过for和id配合使用:男...

  7. django+appium实现UI自动化测试平台(开源部分,可定制开发)

             背景   UI自动化,在进行的过程中,难免会遇到平台化,   在实际的工作中,有的领导也会想 […]...

  8. (转)Eclipse 下找不到或无法加载主类的解决办法

    转自:http://my.oschina.net/leejun2005/blog/106789,写的太好了! […]...

展开目录

目录导航