Jump to content
Sign in to follow this  

Recognize softwares which installed on PC

Recommended Posts



Does anyone knows how can i recognize which softwares are installed on specific PC?

I would like to preset it to the user in GUI.



Share this post

Link to post
Share on other sites

$SoftwareList = _SoftwareInventory()

$SoftwareList = _SoftwareInventory('AutoIt v3.3.0.0')
If Not @error Then _ArrayDisplay($SoftwareList)

Func _SoftwareInventory($sFindSoftwareName = '', $sComputer = '')
    Local $iCount = 0

    If $sComputer <> '' Then $sComputer = '\\' & StringReplace($sComputer, '\', '') & '\'
    Local Const $sRegUnistallKey = $sComputer & 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'

    While 1
        $iCount += 1
        $sKey = RegEnumKey($sRegUnistallKey, $iCount)
        If @error <> 0 Then ExitLoop
        $sDisplayName = StringReplace(RegRead($sRegUnistallKey & '\' & $sKey, 'Displayname'), ' (remove only)', '')
        $iDisplayVersion = RegRead($sRegUnistallKey & '\' & $sKey, 'DisplayVersion')

        If $sDisplayName <> '' Then
            If $sFindSoftwareName <> '' And StringInStr($sDisplayName, $sFindSoftwareName) = 0 Then ContinueLoop
            If Not IsDeclared('aSoftwareList') Then Dim $aSoftwareList[1][2]
            ReDim $aSoftwareList[UBound($aSoftwareList) + 1][2]
            $aSoftwareList[UBound($aSoftwareList) - 1][0] = $sDisplayName 
            $aSoftwareList[UBound($aSoftwareList) - 1][1] = $iDisplayVersion

    If Not IsDeclared('aSoftwareList') Or Not IsArray($aSoftwareList) Then
        Return (SetError(1, 0, ''))
        $aSoftwareList[0][0] = UBound($aSoftwareList) - 1
        Return (SetError(0, 0, $aSoftwareList))
EndFunc   ;==>_SoftwareInventory

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.