Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

python wmi remote registry

45 views
Skip to first unread message

Luis Gonzalez

unread,
Jul 18, 2023, 4:25:03 AM7/18/23
to
I try to read a key in the registry of a remote machine.
First, I tried with

---------------------------
import winreg
place = winreg.HKEY_LOCAL_MACHINE
reg = winreg.ConnectRegistry(r'\\10.37.71.19', place)
---------------------------

But it appears the error: "Path not found".

Then I tried with:

---------------------------
import wmi
import _winreg
c = wmi.WMI(namespace="default").StdRegProv
result, value = c.GetStringValue (
hDefKey=_winreg.HKEY_LOCAL_MACHINE,
sSubKeyName="SYSTEM\ControlSet001\Services\MRxDAV",
sValueName="ImagePath"
)
---------------------------

Other error: ModuleNotFoundError _winreg.

I used winreg instead _winreg, but other error appears: "types do not match".


¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
How can I read the remote registry of a Machine in the same windows domain than mine ???????
0 new messages