0

I have domain administrator access to the remote computer that I'm trying to read registry on with the following code:

import _winreg

rem_reg = _winreg.ConnectRegistry(r"\\REMOTECOMPUTER", _winreg.HKEY_LOCAL_MACHINE)

regKey = _winreg.OpenKey(rem_reg, "SOFTWARE\RegisteredApplications\Internet Explorer", \
        0, _winreg.KEY_READ | _winreg.KEY_WOW64_64KEY)

(value, type) = _winreg.QueryValueEx(regKey, "sponsorsoffered") 

When I run this code I get the following error:

WindowsError: [Error 5] Access is denied

I have checked and this code works perfectly on localhost.

Is there any way of gaining remote access? Perhaps by specifying domain admin username and password to get access? Maybe by using WMI combined with _winreg? Any ideas?

Onedot618
  • 273
  • 2
  • 13

1 Answers1

0

try using openkey with KEY_ALL_ACCESS: regKey = _winreg.OpenKey(rem_reg, "SOFTWARE\RegisteredApplications\Internet Explorer", 0,(wreg.KEY_WOW64_64KEY + wreg.KEY_ALL_ACCESS))

Ido A
  • 87
  • 1
  • 1
  • 8