卸载office密钥的命令

1,管理员运行CMD或者PowerShell
2,转到2016安装目录,C:\Program Files\Microsoft Office\Office16,这是64位的,32位的在C:\Program Files (x86)。
3,先运行cscript ospp.vbs /dstatus 显示已安装KEY的状态,这里只显示KEY的后5位。
4,把要卸载的KEY用命令cscript ospp.vbs /unpkey:XXXXX(KEY后5位)卸载。
5,安装KEY则是:cscript ospp.vbs /inpkey:(完整KEY)

 

附:office2016 版本转换

::code: s1ave77,  ratzlefatz
::[site:forums.mydigitallife.info]
::===============================================================================================================
    @echo off
::===============================================================================================================
:: GET ADMIN RIGHTS
    (NET FILE||(powershell -command Start-Process '%0' -Verb runAs -ArgumentList '%* '&EXIT /B))>NUL 2>&1
::===============================================================================================================
    call :TITLE
    setlocal ENABLEDELAYEDEXPANSION
    pushd "%~dp0"
    cd %~dp0
    set ospp=OfficeSoftwareProtectionProduct
    set osps=OfficeSoftwareProtectionService
    set slp=SoftwareLicensingProduct
    set sls=SoftwareLicensingService
    set spp=SoftwareProtectionProduct
:================================================================================================================
::===============================================================================================================
    for /f "tokens=2 delims==" %%A IN ('"wmic path %sls% get version /format:list"') do set version=%%A
    for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
    if %win% lss 9200 (
        call :NotSupported
        goto:Exit
    )
:================================================================================================================
::===============================================================================================================
:: OFFICE FIXITs
:OfficeConvert
    cls
    pushd %~dp0
    call :HEADER "CONVERT OFFICE", ""
    echo [O] OFFICE 16
    echo [P] PROJECT 16
    echo [V] VISIO 16
    echo:
    echo [A] ACTIVATE ONLINE
    echo:
    echo [B] BACK
    call :FOOTER
    CHOICE /C OPVAB /N /M "YOUR CHOICE ?"
    if %errorlevel%==1 goto :Office16
    if %errorlevel%==2 goto :Project16
    if %errorlevel%==3 goto :Visio16
    if %errorlevel%==4 goto :ActOnline
    if %errorlevel%==5 goto:Exit
::===============================================================================================================
:: OFFICE FIXITs
:Office16
    cls
    pushd %~dp0
    if "%mo16a%"=="" set "mo16a=x86"
    call :HEADER "CONVERT OFFICE 16", ""
    echo Set Office Architechture, e.g x64 or x86
    echo Default: %mo16a%
    call :FOOTER
    set /p mo16a=Set Office Architechture ^>
    cls
    call :HEADER "CONVERTING OFFICE 16", ""
    if "%mo16a%"=="x64" (
        call :ConvertOffice16 "%programfiles%"
        call :ConvertGeneral16 "%programfiles%"
    )
    if "%mo16a%"=="x86" (
        call :ConvertOffice16 "
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值