Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Remote Registry connect issues - return code -2147217406

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,64364
 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 issues - return code -2147217406
  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 issues - return code -2147217406 - 9/17/2008 2:48:51 PM   
  Jpotton

 

Posts: 2
Score: 0
Joined: 9/17/2008
Status: offline
I am writing scripts to connect to thousands of machines in our domain and have done for some time.  I'm constantly plagued by an issue with connections to remote machines.  I find that i can connect to 80% of the remote registry's fine but the remaining 10-20ish % give me greif.  When i try to connect using the following code obviously passing in a valid workstation ID...





Set oRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 'attempt connect to network registry





...I sometimes get the following:

---------------------------
Windows Script Host
---------------------------
-2147217406
---------------------------
OK  
---------------------------

Obviously i've error handled this, but it makes no sense to me because:
  • The worksation's concerned are on the network
  • I can open regedit.exe and remotely connect to the registry

I've googled this error thoroughly and found plenty of ways to handle the error but no ways to correct it or what the actual issue is.  I've even tried manually remotely killing and restarting the "Remote Registry" service.

What gives?? Any ideas??

Cheers,
Jeremy
 
 
Post #: 1
 
 RE: Remote Registry connect issues - return code -21472... - 9/17/2008 2:56:48 PM   
  dm_4ever


Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you haven't started....look at DCOM since this is what WMI relies on

dcomcnfg.exe

_____________________________

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 Jpotton)
 
 
Post #: 2
 
 RE: Remote Registry connect issues - return code -21472... - 9/17/2008 3:17:17 PM   
  Jpotton

 

Posts: 2
Score: 0
Joined: 9/17/2008
Status: offline
Forgive me if i've missed something but the service "Windows Management Instrumentation" depends on RPC???

Cheers,
Jeremy

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Remote Registry connect issues - return code -21472... - 9/17/2008 4:13:57 PM   
  dm_4ever


Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Try the WMI diag on one of the machine you're having issues with....DCOM is used, needed, and can potentially be a reason for you not being able to connect
http://www.microsoft.com/technet/scriptcenter/topics/help/wmidiag.mspx

EDIT:// Using wbemtest is also a good way to verify WMI is functioning properly

< Message edited by dm_4ever -- 9/18/2008 12:21:29 AM >


_____________________________

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 Jpotton)
 
 
Post #: 4
 
 RE: Remote Registry connect issues - return code -21472... - 9/18/2008 12:15:23 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
Another thing to try is run HTAedit on the machine in question. I have seen the StdRegProv move to root\DEFAULT\ms_409. I have not tracked it down to an installation or patch yet, but it's worth the two minutes to check.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to dm_4ever)
 
 
Post #: 5
 
 
 
  

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 issues - return code -2147217406 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