中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-15 12:37
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS批处理 & 脚本技术(批处理室) » Batch script for querying registry software information
Printable Version  5,983 / 36
Floor1 PPdos Posted 2007-01-22 22:49
高级用户 Posts 268 Credits 783
Strive to post and strive for promotion ^^

Small thing used to query the software registry information installed on the computer (test environment XP)



Everyone's interest and support made me do some improvements again (second modification on 07/10/26):



[ Last edited by PPdos on 2007-10-26 at 12:18 AM ]
Floor2 lxmxn Posted 2007-01-23 07:44
版主 Posts 4,938 Credits 11,386

  Well, not bad, support!

  Tested it, some sub-keys were not detected. The owner can improve it further. It would be better if the default key value can be detected.
Floor3 vkill Posted 2007-01-23 09:01
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Hehe, can be used to make portable software
Floor4 PPdos Posted 2007-01-23 09:36
高级用户 Posts 268 Credits 783
```
@echo off
title Scanning Registry...
mode con cols=50 lines=10
setlocal enabledelayedexpansion
>%temp%\reglist.txt echo %DATE%%time% Registry Scan Report
for /f "tokens=3 delims=\" %%i in ('reg query HKLM\SOFTWARE') do (
echo Current scanning information: HKLM\SOFTWARE\%%i
>>%temp%\reglist.txt echo ================================================================
>>%temp%\reglist.txt echo Software Name:%%i
>>%temp%\reglist.txt echo ================================================================
if not "%%i"=="Classes" if not "%%i"=="Microsoft" for /f "tokens=4 delims=\" %%j in ('reg query HKLM\SOFTWARE\%%i 2^>nul') do (
echo Software Information: %%j>>%temp%\reglist.txt

for /f "tokens=* delims=" %%k in ('reg query "hklm\software\%%i\%%j" /S^|findstr /c:"REG_SZ" ') do (
set /a n+=1
cls
echo Number of scanned items: !n! Current information: %%j
echo Associated File Information:%%k>>%temp%\reglist.txt )

)
)
)
>>%temp%\reglist.txt echo If you need to save the result, please choose to save the file as BY PPdos
title FINISHED&echo Scan Completed!
ping 127.0>nul
start %temp%\reglist.txt
```

Attachments
软件注册表信息查询.rar (666 bytes)
Floor5 PPdos Posted 2007-01-23 09:51
高级用户 Posts 268 Credits 783
Floor6 lxmxn Posted 2007-01-24 01:37
版主 Posts 4,938 Credits 11,386

  Not bad, the updated version scans more information, support!
Floor7 ccwan Posted 2007-01-24 01:46
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
Give a like, wish the thread starter to be promoted to a higher level as soon as possible
Floor8 redtek Posted 2007-01-24 02:18
金牌会员 Posts 1,147 Credits 2,902
Appreciate + strongly support~~~
Floor9 0401 Posted 2007-01-24 05:47
中级用户 Posts 88 Credits 435
Hehe, quite interesting, give support.
Floor10 tao0610 Posted 2007-01-24 06:04
高级用户 Posts 218 Credits 579
It's pretty good, but the byte count judgment of Chinese characters by reg query output will have problems.
Floor11 happy3 Posted 2007-01-24 06:16
初级用户 Posts 23 Credits 45
Floor12 zhenyun168 Posted 2007-01-27 14:05
初级用户 Posts 13 Credits 24
Floor13 liuyilin Posted 2007-01-30 09:30
初级用户 Posts 16 Credits 38
Hehe, can be used to make portable software
Floor14 bushuoaini Posted 2007-09-05 10:10
新手上路 Posts 1 Credits 2
Floor15 zyfcxp Posted 2007-09-07 19:23
初级用户 Posts 24 Credits 41
Wish the owner to be promoted to a higher level as soon as possible
1 2 3  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023