Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


remote registry connect

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> remote registry connect
  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 >>
 remote registry connect - 6/9/2008 10:13:40 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
Hey all, first post here and looking for a hand.

I'm trying to connect to a computer on the network to read a key in the registry.  I am getting the following error:

Permission denied: 'GetObject'

Code: 800A0046

Here is my code:

const HKEY_CURRENT_USER = &H80000001
strComputer = "REGTEST"
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Console"
strValueName = "HistoryBufferSize"
oReg.GetDWORDValue _
HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
WScript.Echo "Current History Buffer Size: " & dwValue


I've tried looking at the services, dcom and impersonation levels.

Any other ideas would be appreciated.
 
 
Post #: 1
 
 RE: remote registry connect - 6/9/2008 11:05:10 AM   
  dm_4ever


Posts: 2665
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Are you sure you have administrative rights on that box?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to simon)
 
 
Post #: 2
 
 RE: remote registry connect - 6/9/2008 11:15:54 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
the user accounts have the same username and password for the admin of both of the computers. 

One thing i have noticed is that when i connect to the remote machine through regedit, using networked registry, i only have access to HKEY_USERS.  If I attempt to open the HKEY_LOCAL_MACHINE, i get an error while opening key. 

The key I am reading can be located anywhere in the registry, (its not going to be the HistoryBufferSize).

How would I change that code to open a key in the root of the HKEY_USERS registry?

(in reply to simon)
 
 
Post #: 3
 
 RE: remote registry connect - 6/9/2008 1:56:32 PM   
  dm_4ever


Posts: 2665
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
This sounds like a permissions issue....you should get this figured out first.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to simon)
 
 
Post #: 4
 
 RE: remote registry connect - 6/10/2008 4:33:38 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
ive tried everything i could find on google.  Im still getting the same error.  Anyone have any ideas?

(in reply to simon)
 
 
Post #: 5
 
 RE: remote registry connect - 6/12/2008 11:06:04 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
bump

I could really use some help with this.  Ive tried editing the gpedit.msc, the services running, the dcom settings...

(in reply to simon)
 
 
Post #: 6
 
 RE: remote registry connect - 6/12/2008 11:47:33 AM   
  dm_4ever


Posts: 2665
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you continue getting the same error and you've verified you have the necessary permissions, then it could be that WMI is corruped on this one machine you're trying it on.  Are you getting this error on more than one computer?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to simon)
 
 
Post #: 7
 
 RE: remote registry connect - 6/13/2008 4:49:23 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
I get the error on every remote machine i try it on.  Could you give me some tips on acquiring the proper permissions to access the registry remotely?

(in reply to dm_4ever)
 
 
Post #: 8
 
 RE: remote registry connect - 6/16/2008 12:01:50 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
If you get it with every machine then you will need to work with your network admins to get the rights to the remote machines.

_____________________________

"... 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 simon)
 
 
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 >> remote registry connect 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