本帖最后由 tz_being 于 2012-6-3 23:24 编辑
试验结果,对XP SP2而言,10楼的代码修改为下面这样是可行的,但对XP SP3而言却又不行了:- @echo off&setlocal enabledelayedexpansion
- for /f "skip=4 tokens=1,2,3*" %%i in ('reg query "HKCR\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\DefaultIcon"') do (
- set "str=%%j"
- set "str=!str:reg_expand=!"
- )
- echo %str%
- pause
复制代码
|