跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 同样的命令为什么WIN10用不了。!
未分類
4 12 月 2020

同样的命令为什么WIN10用不了。!

芭啦啦能量 大佬有话说 :

同样的命令为什么WIN10用不了。!

https://mjjzp.cf/img/2020/12/04/0f03bedb02176.png

WIN7又没问题!!

@echo off
for /f "tokens=2 delims==" %%1 in (‘assoc .doc’)do (
    for /f "tokens=2 delims==" %%2 in (‘ftype %%1’)do (
      for %%3 in (%%2)do (if not defined p set p=%%~dp3
      )
    )
)
cd %p%
cscript ospp.vbs /sethst:kms.03k.org

获取office路径,KMS激活

Mortttttty 大佬有话说 :

不是 已经给你 提示了吗, 文件 路径 不对 ,你看看你的执行路径子在哪 ,相对 文件的路径 ,不对就改改 路径:)

芭啦啦能量 大佬有话说 :

win10 可以另类方法运行
start /d %p% cscript ospp.vbs /sethst:kms.03k.org
不过这样没法兼容WIN7,好烦,

ABCHINA 大佬有话说 :

win就这几个大版本,获取一下判断就完事

嗷嗷 大佬有话说 :

你可以先判断Win7/Win10再执行不同的命令

嗷嗷 大佬有话说 :

echo 操作系统版本:
ver|findstr /r /i " [版本 5.1.*]" > NUL && goto WindowsXP
ver|findstr /r /i " [版本 6.1.*]" > NUL && goto Windows7
ver | find "5.2." > NUL &&goto win2003   
ver | find "6.2." > NUL &&goto win8
ver | find "6.3." > NUL &&goto win8.1
ver | find "10.0" > NUL &&goto win10

芭啦啦能量 大佬有话说 :

嗷嗷 大佬有话说 : 2020-12-4 17:39

妙啊,妙不可言

seafood_to 大佬有话说 :

。。。用HEU_KMS_Activator吧你要的功能都有

芭啦啦能量 大佬有话说 :

嗷嗷 大佬有话说 : 2020-12-4 17:39

@echo off

set OsVersion=0

ver|findstr /r /i "5.1.*" > NUL && goto Server2003winxp
ver|findstr /r /i "5.2.*" > NUL && goto Server2003winxp
ver|findstr /r /i "6.0.*" > NUL && goto Server2008win7
ver|findstr /r /i "6.1.*" > NUL && goto Server2008R2win7
ver|findstr /r /i "6.2.*" > NUL && goto Server2012win8
ver|findstr /r /i "6.3.*" > NUL && goto Server2012R2win8.1
ver|findstr /r /i "10.0.*" > NUL && goto Server2016win10
goto UnknownVersion

:Server2003winxp
set OsVersion="Windows Server 2003 for xp"
goto Show

:Server2008R2win7
set OsVersion="Windows Server 2008 for win7"
goto Show

:Server2008R2win7
set OsVersion="Windows Server 2008 R2 for win7"
goto Show

:Server2012win8
set OsVersion="Windows Server 2012 for win8"
goto Show

:Server2012R2win8.1
set OsVersion="Windows Server 2012 R2 for win8.1"
goto Show

:Server2016win10
set OsVersion="Windows Server 2016 for win10"
goto Show

:UnknownVersion
set OsVersion="UnknownVersion"
goto Show

:Show
echo %OsVersion%

pause

完善了一下,

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具