Created
November 30, 2009 05:03
-
-
Save bulkan/245264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import registry | |
def findUninstallStr(q): | |
''' q: some unique string that appears in the UninstallString value ''' | |
uninstallKey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' | |
for subkey in registry.GetSubKeys(uninstallKey): | |
for (valuename, value, valuetype) in registry.GetKeyValues("%s\%s" %(uninstallKey, subkey)): | |
if 'UninstallString' == unicode(valuename) and q in unicode(value): | |
uninstallString = value | |
return r"%s" %unicode(uninstallString) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment