Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying remote registry

Status
Not open for further replies.

zarkon4

MIS
Dec 16, 2003
641
US
I am trying to create some code to modify a registry setting remotely. I can get connected to the pc's registry but retrieving any settings have not worked.

Anyone have any samples? I searched this forum, but none of them worked.
 
Is this possible?

Registry settings are, by design, unique to that machine so any code to retrieve settings would be from the local machine surely and not the remote machine.

Waiting for someone to prove me wrong...

Andy
 
Also interested to know why you want to do this.

I am guessing there must be a simpler solution to your problem.

Andy
 
It is possible to do using WMI. Check the Win32_Registry object library.

Modifying a registry setting remotely makes sense if you are some sort of network administrator who doesn't want to schlep over to the physical location of a given machine to make changes to the registry.

HTH

Bob
 
I did get it working.
lRC = RegConnectRegistry("\\" & strComputer, HKEY_LOCAL_MACHINE, lKeyHandle)
lRC = RegOpenKey(HKEY_LOCAL_MACHINE, FullKeyName, lKeyHandle)
lRC = RegConnectRegistry("\\" & strComputer, HKEY_LOCAL_MACHINE, lKeyHandle)
lRC = RegOpenKey(lKeyHandle, FullKeyName, lKeyHandle)
'Save a string to the key
RegSetValueEx lKeyHandle, "DATADICTIONARY", 0, REG_SZ, ByVal "{Location of CDD file}", Len("Location of CDD file}")
RegCloseKey (lKeyHandle)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top