Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 18th, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. def listRegistryStartedProcesses():
  2. #open key
  3. key = _winreg.OpenKey(
  4.     _winreg.HKEY_LOCAL_MACHINE,
  5.     "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
  6.     )
  7.  
  8. # list values owned by this registry key
  9. try:
  10.     i = 0
  11.     while 1:
  12.         name, value, type = _winreg.EnumValue(key, i)
  13.         print repr(value),
  14.         i += 1
  15. except WindowsError:
  16.     print