我来了 当前离线
少校
xxpinqz (YiFeng)当前离线
中校
@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复制代码
TOP
CrLf 当前离线
论坛巡查
@echo off for /f "tokens=2 delims==" %%a in ('assoc .doc') do ( for /f "tokens=1* delims==" %%b in ('ftype %%a') do ( for %%z in (%%c) do set word=%%z&goto next ) ) :next echo;word 路径为:%word% pause&exit复制代码
PowerShell (powershell传教士)当前离线
上尉
function 我也来了呵呵 { $word路径 = ( Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\11.0\Word\InstallRoot -Name path).path + "\winword.exe" if (test-path $word路径) { Start-Process $word路径 break } $word路径 = ( Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\12.0\Word\InstallRoot -Name path).path + "\winword.exe" if (test-path $word路径) { Start-Process $word路径 break } $word路径 = ( Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\13.0\Word\InstallRoot -Name path).path + "\winword.exe" if (test-path $word路径) { Start-Process $word路径 break } $word路径 = ( Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\14.0\Word\InstallRoot -Name path).path + "\winword.exe" if (test-path $word路径) { Start-Process $word路径 } } 我也来了呵呵 复制代码
DAIC 当前离线
中将
评分人数