the2008 发表于 2012-6-13 22:58:20

使用autoit检测电脑是否已经安装了某一软件

Dim $regkey,$uninstallkey,$displayname,$uninstallstring
Dim $i,$haveinstall
$regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
For $i= 1 To 100
$uninstallRegKey = RegEnumKey($regKey , $i)
$uninstallstring=$regkey&'\'&$uninstallRegKey
$displayname=RegRead($uninstallstring,"displayname")
If $displayname="Total Commander"Then
        $haveinstall="ture"

EndIf
Next

If $haveinstall="ture"Then
        MsgBox(0,"title","您已经安装了tc")
Else
        MsgBox(0,"title","您没有安装了tc")
        EndIf
页: [1]
查看完整版本: 使用autoit检测电脑是否已经安装了某一软件