本帖最后由 xxpinqz 于 2013-7-23 17:19 编辑
- @echo off
- set "str1=HKLM\SOFTWARE\Microsoft\Office"
- set "str2=\Word\InstallRoot"
- for /f "delims=" %%a in ('reg query "%str1%"^|findstr "1[1-4]\.0$"')do (
- if not defined dst (
- for /f "tokens=2*" %%b in ('reg query "%%a%str2%" /v path 2^>nul')do (
- set "dst=%%c"
- )
- )
- )
- echo,%dst%
- pause
复制代码
|