[Tutor] Window Registry Access

Alan Gauld alan.gauld at freenet.co.uk
Thu Oct 28 09:54:32 CEST 2004

> I am attempting to read information from a remote registry using

I'd recommend using WSH for this. You can access the WSH objects
using the Python win extensions as usual.

Here is some VBSCript sample code, converting to Python should
be easy ...but I'm in a hurry :-(

Dim wshSHell
Set wshShell = CreateObject("WScript.Shell")

' Find the Windows OS version
' CReate a new context menu item for Notepad
wshShell.RegWrite("HKCR\*\Shell\Notepad", "View with Notepad",

Its possible to do edits over the network too by giving a network
There are also networking objects within WSH...

Alan G.

More information about the Tutor mailing list