Jump to content

scanning registry


Recommended Posts

I am trying to determine what AV is installed on a machibe to prevent a user from installing our antivirus on top of an existing AV. I need to scan for several different types of antivirus in the

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key

I would like to display the "Display Name" and added bonus would be to create a link or create a text file of the "Uninstall Key" If no ANtivirus is found I would like to continue the script and install ours. Any ideas

Link to comment
Share on other sites

  • Moderators

I am trying to determine what AV is installed on a machibe to prevent a user from installing our antivirus on top of an existing AV. I need to scan for several different types of antivirus in the

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key

I would like to display the "Display Name" and added bonus would be to create a link or create a text file of the "Uninstall Key" If no ANtivirus is found I would like to continue the script and install ours. Any ideas

RegEnumKey / RegEnumValue

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Tried that can't seem to make it work

$MYAPP = "AutoIt "

$UNINSTALLSTRING = GetUninstallString($MYAPP)

If Not @error Then Run($UNINSTALLSTRING)

Func GetUninstallString($app)

$key = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall"

$i = 0

While 1

$i = $i + 1

$subkey = RegEnumKey($key,$i)

If @error Then ExitLoop

$displayname = RegRead($key & "\" & $subkey,"DisplayName")

If @error Then ContinueLoop

If $displayname == $app Then

Return RegRead($key & "\" & $subkey,"UninstallString")

EndIf

WEnd

SetError(1)

Return ""

EndFunc

StringInStr()?

Link to comment
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
 Share

  • Recently Browsing   0 members

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