Sign in to follow this  
Followers 0
Manjish

tcp send recieve to get remote registry

7 posts in this topic

Guys,

I am trying to send the registry of the remote comp through tcp send/recieve.

I don't have a clue as to what can be done here.

N i know there are many ways to get remote reg value.. But was just looking for this specific method..

Can this be done?? If yes, please help me, as i don't know heads or tails of this matter..

Thanks,


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites



You'll need some sort of client and server. Basically it depends if you wish to send 1 or 10. If it is the latter maybe you should just make AutoIt export the keys into a file and send the file. Up to you.

Cheers,

Brett

Share this post


Link to post
Share on other sites

Download "RegObj.dll" and use ObjCreate with "RegObj.Registry". The RemoteRegistry method requires the host computer name or IP IIRC and the host machine needs the registry service turned on to successfully process the request. Nothing TCP related...

Share this post


Link to post
Share on other sites

You'll need some sort of client and server. Basically it depends if you wish to send 1 or 10. If it is the latter maybe you should just make AutoIt export the keys into a file and send the file. Up to you.

Cheers,

Brett

Brett,

Thanks for the pointers.. i am sorry if i did not fully explain my need.. i have a vista pc, whose reg i hv to check from a server 2003 m/c.. for that, the normal regread doesn't work.. tried it out, just returns a blank string..

So was thinking mayb of using tcp send recieve.. just between these two m/cs..

Any idea how i can do that?? I don't want to import the keys in a file.. just want to send them as a tcp msg..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

@authenticity..

Please read my above post to und what i require.. I don't know whether the method wchich u suggested will work for vista or not.. also i am not very sure that i fully und what u mean.. can u please provide an example code.. thanks...


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Happily, though I'm doubt it'll work anymore even on XP as it's so old and probably not supported by Vista. The example is in VBScript but it's one of those scripts (written by G. Born originally) that is easily convertible.

'************************************************
' File:   RemoteReg.vbs (WSH sample in VBScript) 
' Author: (c) G. Born
'
' Using Regobj.dll to enumerate the subkeys in a
' Registry key and then enumerating the values
' of the key
'************************************************
Option Explicit

' Define the two keys.
Const key1 = "\HKEY_CLASSES_ROOT\Folder"
Const key2 = _
    "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Const host = "\\Wien"

Dim objReg
Dim RootKey, objRemote
Dim name
Dim oVal

' Create object reference to Regobj.dll.
Set objReg = WScript.CreateObject("RegObj.Registry")

' ### Connect to remote Registry. ###
Set objRemote = objReg.RemoteRegistry(host)

' Retrieve property of parent key object.
Set RootKey = objRemote.RegKeyFromString(key1)

name = "Registry key " & key1 & " entries on " & _
       host & " are" & vbCrLf

For Each oVal In RootKey.SubKeys ' Loop through collection.
    name = name & oVal.Name & vbCrLf
Next

MsgBox name, vbOKOnly, "WSH Registry Enumerate sample"

' Retrieve property of key object.
Set RootKey = objRemote.RegKeyFromString(key2)

name = "Registry key " & key2 & " value entries on" & _
       host & " are" & vbCrLf

For Each oVal In RootKey.Values  ' Loop through collection.
    name = name & oVal.Name & vbTab & oVal.Value & vbCrLf
Next

MsgBox name, vbOKOnly, "WSH Registry Enumerate sample"   

'*** End

Again, I don't know if it works or has anything to do with your problem...

Share this post


Link to post
Share on other sites

thanks.. i'll see if its of use to me..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0