Error when accessing remote registry

c42 nospam at nospam.net
Tue Jun 17 16:29:46 EDT 2003


I'm using the following code to check the registry on a remote machine. 
(I have administrative rights over the domain.) The code works fine when 
it hits a Windows 2000 Pro or Windows XP Pro box, but crashes when it 
hits Windows NT4 workstation (WindowsError: [Errno 87] The parameter is 
incorrect). Does anyone have any suggestions? (WinXP Pro, Python 2.2.3, 
win32all 152)

Thanks,
c42

-----------------------------
Sample code:
MachName = "TEST_1"
aReg = ConnectRegistry(MachName,HKEY_LOCAL_MACHINE)        
aKey = OpenKey(aReg, r"SOFTWARE\\Network Associates\\TVD\\Shared 
Components\\On Access Scanner\\McShield\\Configuration") 
-----------------------------

Error:
Traceback (most recent call last):
  File "C:\Program Files\ActiveState Komodo 2.3\callkomodo\kdb.py", line 
430, in _do_start
    self.kdb.run(code_ob, locals, locals)
  File "C:\Python22\lib\bdb.py", line 349, in run
    exec cmd in globals, locals
  File "C:\Documents and Settings\Chardee.WAYNEFIRE\My Documents
\Personal Projects\Python\Code\CLH\Search domain registries for info
\AVExclusionScan.py", line 92, in ?
    aKey = OpenKey(aReg, r"SOFTWARE\\Network Associates\\TVD\\Shared 
Components\\On Access Scanner\\McShield\\Configuration")
WindowsError: [Errno 87] The parameter is incorrect




More information about the Python-list mailing list