AntiVirusGuy Posted August 10, 2006 Share Posted August 10, 2006 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 More sharing options...
Moderators SmOke_N Posted August 10, 2006 Moderators Share Posted August 10, 2006 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 ideasRegEnumKey / 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 More sharing options...
AntiVirusGuy Posted August 10, 2006 Author Share Posted August 10, 2006 how do I keep looking and then display it's uninstall string. then at the end say no more vlaues found or no av detected if I did not find any? Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted August 10, 2006 Author Share Posted August 10, 2006 I will also need to wild card it as I need to detect anything with Norton in it. I will also need to detect multiple products Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted August 11, 2006 Author Share Posted August 11, 2006 But what if the exact string is unkown I just want it to contain a word like symantec??? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 11, 2006 Moderators Share Posted August 11, 2006 StringInStr()? 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 More sharing options...
AntiVirusGuy Posted August 11, 2006 Author Share Posted August 11, 2006 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 ""EndFuncStringInStr()? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now