不要让那6个if命令每次都执行,试试这样:- reg query "hklm\software\wow6432node">nul 2>nul&&(
- echo/&echo 读取系统64位开机启动项
- for /f "tokens=1,* delims=(" %%i in ('reg query "hklm\software\wow6432node\microsoft\windows\currentversion\run" /z') do (
- for /f "tokens=1,* delims=) " %%k in ('echo=%%j') do (
- if "%%k"=="1" (
- echo=字符串值: %%~dpnxl
- ) else if "%%k"=="3" (
- echo=二进制值: %%~dpnxl
- ) else if "%%k"=="4" (
- echo=dword[32-bit]值: %%~dpnxl
- ) else if "%%k"=="11" (
- echo=dword[64-bit]值: %%~dpnxl
- ) else if "%%k"=="7" (
- echo=多字符串值: %%~dpnxl
- ) else if "%%k"=="2" (
- echo=可扩充字符串值: %%~dpnxl
- )
- )
- )
- )
复制代码
|