๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: microsoft.public.win32.programmer.wmi
1 messages
1 total messages Started by Luis Gonzalez Tue, 18 Jul 2023 08:25
python wmi remote registry
#1
Author: Luis Gonzalez
Date: Tue, 18 Jul 2023 08:25
35 lines
2447 bytes
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 ???????
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads