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. #动态规划 0-1背包问题思路概述

      01背包问题是动态规划中的经典问题。 本篇文章主题:分析与优化最基本的01背包问题,对此类问题解题有一个基 […]...

  2. 新手读懂五线谱

      新手读懂五线谱   一直以来都觉得五线谱好神秘,作为计算机专业的我,音乐水平也就停留在儿时“一闪一闪亮晶晶 […]...

  3. 计算机网络学习笔记——计算机网络概述

    计算机网络 > 学了一个多暑假的计算机网络,突然发现目前对学习Web安全来说用处并不大    一、计算机 […]...

  4. highcharts几个常用插件的整合

    主要包括:no-data-display:用于图表没有数据的时候给用户一提示信息如显示“无数据”而不是空白cu […]...

  5. Java微信公众号扫描带参数二维码事件(消息加密)

    最近又开始了微信二维码的开发,开个帖子记录一下 一、获取access_token 首先我们需要获取access […]...

  6. 无法访问gcr.io的几种解决办法

    无法访问gcr.io的几种解决办法 由于一些原因,在国内无法访问gcr.io上的镜像,在安装kubernete […]...

  7. Head First设计模式——生成器和责任链模式

    生成器 生成器模式:封装一个产品的构造过程,并允许按步骤构造。 现又一个度假计划指定,需要指定度假每一天的活动 […]...

  8. mklink /d 目录符号链接

    刚装好Windows Live Writer,却发现日志保存路径是默认的改都没法改,在C:\Users\用户名 […]...

展开目录

目录导航