Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


vbs to connect remote registry ...

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,38401
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbs to connect remote registry ...
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 vbs to connect remote registry ... - 10/5/2006 1:18:00 PM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
Hey guys,

when using regedit on your local PC, there is an option to "connect network registry ..."

has anyone come up with a way to script this connection? I have checked out the parameters for running regedit.exe from the command line....but it doesn't look like you are able to pass it a "REMOTE_PC" value :(

Any ideas ?


 
 
Post #: 1
 
 RE: vbs to connect remote registry ... - 10/6/2006 1:20:01 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
You can connect to the remote machine's registry via WMI. Search this forum for terms like "WMI", "Registry", and "Remote".

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to takeda kozo)
 
 
Post #: 2
 
 RE: vbs to connect remote registry ... - 10/9/2006 10:02:59 AM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
I understand that I can connect to a remote registry and read/write values etc. But I want to be able to launch REGEDIT and do this......not via script code

Reason being, the HTA application I'm working on is going to have a button which will, hopefully, run regedit and then connect to the remote PC so the users can browse the remote reg

I have currently scripted this, by running regedit locally, and then scripting the connection via the use of "Sendkeys" .... but this seems messy to me

Anyway, if anyone knows a better way then please let me know


Current Script Section (for remote Regedit connection) - WORKING, but messy (ie: sendkeys)
=========================================================

Sub Remote_Regedit

Quick_Online_Test
If Online_Status = 0 Then  
   DA_Authentication_Status.InnerHTML = "<b><font color='red'>Machine is OFFLINE</font></b>" 
Else  
   If Remote_Access_Granted <> 1 Then Remote_Authenticate   
   strConnect_Regedit = "oShell.Run(""c:\windows\regedit.exe"")"     
   Execute(strConnect_Regedit)   
   SendKeysPause = window.setTimeout("Regedit_Connect_Send_Keys", 500, "VBScript")  
End If

End Sub

'=============

Sub Regedit_Connect_Send_Keys
oShell.SendKeys "%fc"
oShell.SendKeys TB_Hostname.Value
oShell.SendKeys "{ENTER}"
End Sub

'=============

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: vbs to connect remote registry ... - 10/9/2006 4:49:46 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
quote:

Reason being, the HTA application I'm working on is going to have a button which will, hopefully, run regedit and then connect to the remote PC so the users can browse the remote reg


and then what...

If you are really automating, then you will think ahead and analyze the tasks wanting to be accomplished by browsing the remote machine....

You cannot convince me that users like the view of regedit on their screen, without any action....

Using the tips that EBGreen gave you will also allow you to view data held by the registry database...

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to takeda kozo)
 
 
Post #: 4
 
 RE: vbs to connect remote registry ... - 10/9/2006 11:15:11 PM   
  mbouchard


Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
I  did a quick search on regedit command line arguements and did not find any that would open regedit on another PC.  if you really wanted to open the reg for browsing, you could use sendkeys.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to Snipah)
 
 
Post #: 5
 
 RE: vbs to connect remote registry ... - 10/10/2006 11:34:38 AM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
quote:



If you are really automating, then you will think ahead and analyze the tasks wanting to be accomplished by browsing the remote machine....

You cannot convince me that users like the view of regedit on their screen, without any action....



I hear what you're saying, and I hope your not "implying" that I haven't thought ahead ;)

I work in an organisation that literally has hundreds of applications, hotfixes, security patches etc etc etc and the guys supporting these apps have a requirement to use regedit occasionally to "browse" the registry for different reasons. What I'm trying to say, is that there could be hundreds and hundreds of different keys etc that these guys need to view/add/change/delete and it's not possible to "think ahead" and script all these possibilities into a single script. Actually, no offence, but that notion is ridiculous. The amount of new apps, hotfixes, changes etc that happen in a global company of this size would mean I would need to rewrite the HTA application every week, also ridiculous.

These guys requested the ability to be able to launch regedit (connected to the remote PC) so that they can browse to whatever area of the registry that they need for the particular ticket they are working on at the time. My job is to try and satisfy this request as it is what they would find easiest to do their job.

Should my HTA application have 1574 buttons and be updated weekly ? or 1 button and let the users browse to whereever they need to go ?

You cannot convince me that you actually thought about your answer before you typed it out .....................





(in reply to Snipah)
 
 
Post #: 6
 
 RE: vbs to connect remote registry ... - 10/10/2006 4:51:26 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
quote:

I hear what you're saying, and I hope your not "implying" that I haven't thought ahead ;)


No, I didn't mean that, at the time of reading your post, it didn't seem logical, while VBScript has many possibilities to perform almost any Windows task.

quote:

it's not possible to "think ahead" and script all these possibilities into a single script. Actually, no offence, but that notion is ridiculous.


I am in a Global Enterprise myself and all the hundreds of applications, hotfixes, security patches etc etc etc that you have, we have aswell, and so do other people here on the forum.

And yes, it may sound unbelievable, but that is also what VBScript is designed for, to relief certain jobs, and leave it up to automating

quote:

 
Should my HTA application have 1574 buttons and be updated weekly ?


Dunno, depends if you automate certain tasks, and not all...there are many ways to automate dynamically, that is, one script for various jobs, looking only at the hotfixes, there are very good generic scripts which can be easily applied. Especially since the HotFixes have different numbers each time.

quote:

 
You cannot convince me that you actually thought about your answer before you typed it out .....................


<no need for feedback>

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to takeda kozo)
 
 
Post #: 7
 
 RE: vbs to connect remote registry ... - 10/10/2006 6:40:44 PM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
Could this be an option
PolicyMaker™ Registry Extension freewarehttp://www.desktopstandard.com/PolicyMakerRegistryExtension.aspx

(in reply to takeda kozo)
 
 
Post #: 8
 
 RE: vbs to connect remote registry ... - 10/10/2006 7:52:00 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
SendKeys is the only option I'm afraid.  I had to resort to using the evil bastard/spawn of Satan/hellchild thing in ManagePC and it bugs me so much that I've started writing a Registry Editor of my own simply so that I can pass a computer to it via the command-line!

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to gdewrance)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbs to connect remote registry ... Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts