Skip to content

Instantly share code, notes, and snippets.

@digitalm
Last active August 29, 2015 14:19
Show Gist options
  • Save digitalm/d8f8b46790141b2dc76c to your computer and use it in GitHub Desktop.
Save digitalm/d8f8b46790141b2dc76c to your computer and use it in GitHub Desktop.
Officeのライセンスキーの末尾5文字を取得する
# このコードをcmd.exeで実行する
cscript "%programfiles%\Microsoft Office\Office14\ospp.vbs" /dstatus
# 出力される YYYYY に書いてある
# Microsoft (R) Windows Script Host Version 5.8
# Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
#
# ---Processing--------------------------
# ---------------------------------------
# SKU ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# LICENSE NAME: Office 14, OfficeProPlus-Retail2 edition
# LICENSE DESCRIPTION: Office 14, RETAIL channel
# LICENSE STATUS: ---LICENSED---
# ERROR CODE: 0 as licensed
# Last 5 characters of installed product key: YYYY
# ---------------------------------------
# ---------------------------------------
# ---Exiting-----------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment