Newsgroups: microsoft.public.scripting.vbscript
From: "Richard Mueller [MVP]" <rlmueller-nos...@ameritech.nospam.net>
Date: Thu, 5 Nov 2009 10:35:43 -0600
Local: Thurs, Nov 5 2009 4:35 pm
Subject: Re: connecting to remote registry not working sometimes
news:1DEEB21F-7A24-4299-B297-E8E5E34C0BEF@microsoft.com...
> My script sometimes quits on this line: On some clients it might help to use: > Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & > strCompName & "\root\default:StdRegProv") > The script is for installing the Microsoft SCCM client to a group of > It works fine most of the time, but every so often it bombs at the line I > But that produced the same result: the script gets to that line and quits > I added "On Error Resume Next" to the file to allow the script to continue > All the PCs are Windows XP, Service Pack 2, Office 2003. Set objReg = GetObject("winmgmts:" _ If that doesn't work, then possibly a firewall is blocking. The following netsh firewall set service remoteadmin enable Finally, WMI can become corrupt. I have used the following links to help http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx http://support.microsoft.com/kb/875605 http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx You can rebuild the WMI repository, if you have XP SP2, with the command: rundll32 wbemupgd, UpgradeRepository The following commands reinstall WMI in the registry: winmgmt /clearadap http://msdn.microsoft.com/en-us/library/aa389286(VS.85).aspx I hope this helps. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||