例如說我要判斷版本後運行 MicrosoftFixit50154.msi 或 MicrosoftFixit50416.msi 或 MicrosoftFixit50450.m ...
飛雪 发表于 2012-8-24 12:48
不知道行不行,试试看:- @echo off&setlocal enabledelayedexpansion
- set v03=MicrosoftFixit50416.msi
- set v07=MicrosoftFixit50154.msi
- set v10=MicrosoftFixit50450.msi
- for %%a in ("11-%v03%" "12-%v07%" "14-%v10%") do (
- for /f "tokens=1,2 delims=-" %%b in ("%%~a") do (
- reg query HKLM\SOFTWARE\Microsoft\Office\%%b.0\Common\LanguageResources /v SKULanguage>nul 2>nul
- if "!errorlevel!"=="0" set flag=1&start /wait "" "%%c"
- )
- )
- if not defined flag echo 未安装 MS Office 2003、2007 或 2010
- pause
复制代码
|