找回密码
 加入
搜索
查看: 5023|回复: 6

[系统综合] 【已解决】如何取当前计算机安装软件列表清单

  [复制链接]
发表于 2010-10-26 15:41:51 | 显示全部楼层 |阅读模式
本帖最后由 wgboy 于 2010-10-28 10:51 编辑

如何取当前计算机安装软件列表清单和软件版本,最好能取出注册码之类的?网上搜到以下代码,取注册表的,但是取出的名字很乱,能不能进行过滤掉系统补丁

$i = 1
while 1
$key = regenumkey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i)
if @error then exitloop
consolewrite($key & @crlf)
$i = $i +1
wend

评分

参与人数 1金钱 +10 收起 理由
afan + 10

查看全部评分

发表于 2010-10-27 08:00:27 | 显示全部楼层
if not(stringleft($key, 2) = 'KB') then consolewrite($key & @crlf)
$i = $i +1
wend

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-10-27 10:33:01 | 显示全部楼层
楼上正解。。
 楼主| 发表于 2010-10-28 10:54:01 | 显示全部楼层
$i = 1
while 1
$key = regenumkey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i)
if @error then exitloop
$softname=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"&$key,"DisplayName")
If @error<>-1 Then
If StringLeft($key, 2)<>"KB"  And StringLeft($softname, 8)<>"Security" And $softname<>"" Then
consolewrite($softname & @crlf)
EndIf
EndIf
$i = $i +1
wend
发表于 2012-9-28 16:58:03 | 显示全部楼层
这只能获取到使用MIS安装的软件信息
发表于 2015-1-28 12:10:37 | 显示全部楼层
没钱了看看呀
发表于 2015-1-29 23:48:18 | 显示全部楼层
学习················
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-18 21:51 , Processed in 0.150846 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表