Jump to content

Recommended Posts

Posted (edited)

ok im just wondering if there is a way that a script can check if a specified program is installed???

edit: lol sorry i for got wut i was doing when i named the thread so please forgive me for that i have the attention span of a 4 year old chimp

Edited by Zmaster

A great place to start Autoit 1-2-3

  • Moderators
Posted

ok im just wondering if there is a way that a script can check if a specified program is installed???

edit: lol sorry i for got wut i was doing when i named the thread so please forgive me for that i have the attention span of a 4 year old chimp

Well you could use FileExists() to see if the .exe file exists, or the way I would do it is by using the RegRead() on this key "HKLM\SOFTWARE". Something like this:

$Name = "Name of Software company"
$Key = "HKEY_LOCAL_MACHINE\SOFTWARE"

For $i = 1 To 1000
    $SubKey = RegEnumKey($Key, $i)
    If @error Then
        MsgBox(0, "", "Your software was not found.")
        ExitLoop
    Else
        If $SubKey = $Name Then 
            MsgBox(0, "", "Your software was found.")
            ExitLoop
        EndIf   
    EndIf           
Next

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...