windows10激活office与visio

windows10激活office与visio

手动搞

linux搭建KMS

创建安装脚本

vim one-key-kms-centos.sh

#! /bin/bash

#One-key-kms script by Dakkidaze <gioku@docomo.net.cn>

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
clear
start(){
yum install gcc git make -y
mkdir /usr/local/kms
cd /usr/local/kms
git clone https://github.com/Wind4/vlmcsd.git
cd vlmcsd
make
cd bin
mv vlmcsd /usr/local/kms/kms
cd /usr/local/kms/
rm -rf ./vlmcsd/
mv kms vlmcsd
clear
echo "Succeeded."
echo "The executable file lies in /usr/local/kms/"
echo "Remember that the server is not running right now."
echo "Please use -h to find possible usage for the executable or visit vlmcsd on Github."
echo "https://github.com/Wind4/vlmcsd"
echo "Addtionally, you may want to get a script to manage it."
echo "In this case, you may download a script at the one-key-kms repository."
echo "Thanks for your using!"
echo "Dakkidaze <gioku@docomo.net.cn>"
}
echo "This script will automatically download and compile KMS Server program for you."
echo "For more information, please visit https://github.com/Wind4/vlmcsd"
echo "Scrpit written by Dakkidaze <gioku@docomo.net.cn>"
echo "READY TO START?"
read -p "y/n:" choice
case $choice in
    "y")
    start
    ;;
    "n")
    exit 0;
    ;;
    *)
    echo "Please enter y or n!"
    ;;
esac
安装kms

sh one-key-kms-centos.sh

启动服务

创建启停脚本

vim kms.sh

#!/bin/bash
# Author: Dakkidaze <gioku@docomo.net.cn>

DAEMON=/usr/local/kms/vlmcsd
STAT=2
check_running(){
PID=`ps -ef | grep -v grep | grep -i "vlmcsd" | awk '{print $2}'`
       if [ ! -z $PID ]; then
        STAT=0
    else
        STAT=1
    fi
}

do_restart() {
    check_running
    if [ $STAT = 0 ]; then
        echo "Restarting KMS Server..."
        kill $PID
    elif [ $STAT = 1 ]; then
        echo "Not started, starting now"
    fi
    $DAEMON -L 0.0.0.0:1688 -l vlmcsd.log
    check_running
    if [ $STAT = 0 ]; then
        echo "Succeeded."
    elif [ $STAT = 1 ]; then
        echo "Failed."
    fi
}
do_stop() {
    check_running
    if [ $STAT = 0 ]; then
            echo "Shutting down KMS Server..."
        kill $PID
        check_running
        if [ $STAT = 0 ]; then
            echo "Failed."
        elif [ $STAT = 1 ]; then
            echo "Succeeded."
            fi
        elif [ $STAT = 1 ]; then
                echo "Not running, no kill."
        fi
}
do_status() {
    check_running
    if [ $STAT = 0 ]; then
                echo "KMS Server is running."
        elif [ $STAT = 1 ]; then
                echo "KMS Server is not running."
        fi
}

do_start() {
    #check_running
    if [ $STAT = 0 ]; then
                echo "KMS Server is already running."
        exit 0;
        elif [ $STAT = 1 ]; then
                echo "KMS Server is not running, starting now..."
    $DAEMON -L 0.0.0.0:1688 -l vlmcsd.log
    fi
        check_running
        if [ $STAT = 0 ]; then
                echo "Succeeded."
        elif [ $STAT = 1 ]; then
                echo "Failed."
        fi
}

case "$1" in
    start|stop|restart|status)
    do_$1
    ;;
    *)
    echo "Usage: $0 start | stop | restart | status "
    ;;
esac
启动kms

sh kms.sh start

主机放行1688端口

如果是云主机需要在安全组中放行

验证KMS服务

本地telnet IP 1688

激活office/visio等

cd /d "%SystemRoot%\system32"
slmgr /skms 你的KMS服务端主机的IP或者域名
slmgr /ato
slmgr /xpr
#以 64 位的 Office2016 为例,进入 Office 目录
cd "C:\Program Files\Microsoft Office\Office16"
cscript ospp.vbs /sethst:你的KMS服务端主机的IP或者域名
cscript ospp.vbs /act

自动搞

首先去I Tell You 上下载你想要的Visio,安装后将下方代码复制到文本文件中,并重命名文件为.bat结尾的文件。如果中文显示为乱码,以ANSI 格式保存可以解决。 也可以手动下载 ed2k://%7Cfile%7CSW_DVD5_Visio_Pro_2016_64Bit_ChnSimp_MLF_X20-42759.ISO%7C714913792%7CFC930AB97B366B3595FC2F28ABAC2A6F%7C/

windows创建bat

@ECHO OFF&PUSHD %~DP0

setlocal EnableDelayedExpansion&color 3e & cd /d "%~dp0"
title office2016 retail转换vol版

%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&goto :eof
:runas

if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16"

:WH
cls
echo.
echo                         选择需要转化的office版本序号
echo.
echo --------------------------------------------------------------------------------                                                         
echo                 1. 零售版 Office Pro Plus 2016 转化为VOL版
echo.
echo                 2. 零售版 Office Visio Pro 2016 转化为VOL版
echo.
echo                 3. 零售版 Office Project Pro 2016 转化为VOL版
echo.
echo. --------------------------------------------------------------------------------

set /p tsk="请输入需要转化的office版本序号【回车】确认(1-3): "
if not defined tsk goto:err
if %tsk%==1 goto:1
if %tsk%==2 goto:2
if %tsk%==3 goto:3

:err
goto:WH

:1
cls

echo 正在重置Office2016零售激活...
cscript ospp.vbs /rearm

echo 正在安装 KMS 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 MAK 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 KMS 密钥...
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99

goto :e

:2
cls

echo 正在重置Visio2016零售激活...
cscript ospp.vbs /rearm

echo 正在安装 KMS 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 MAK 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 KMS 密钥...
cscript ospp.vbs /inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK

goto :e

:3
cls

echo 正在重置Project2016零售激活...
cscript ospp.vbs /rearm

echo 正在安装 KMS 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\project???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 MAK 许可证...
for /f %%x in ('dir /b ..\root\Licenses16\project???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul

echo 正在安装 KMS 密钥...
cscript ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT

goto :e

:e
echo.
echo 转化完成按任意键退出
pause >nul
exit

即点即用和windows installer

即点即用(前缀为cn/zn)是用于安装 Microsoft 365 订阅和大多数 Office 2013 版本及较新版本的技术。 Windows Installer 技术 (MSI,前缀为SW) 用于安装 Office 2016 及更早版本的批量许可证版本

如果 Office 检测到此不兼容性,会显示以下错误消息:

查看

问:如何查看何时过期? 答:只需用:slmgr.vbs -xpr 这条命令

问:如何查看详细激活信息 答:只需用:slmgr.vbs -dlv 这条命令

参考链接

win10企业版激活码Slmgr /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43 excel:2XD8D-6VNBW-G9CWQ-K3RT4-W8GDY

查看

转换VOL版本

转换VOL版本最佳方式

搭建KMS

本文作者:朝圣

本文链接:www.zh-noone.cn/2019/12/windows激活

版权声明:本博客所有文章除特别声明外,均采用CC BY-NC-SA 3.0许可协议。转载请注明出处!

应用到redis墙问题
0 条评论