Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion connecting to remote registry not working sometimes
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard Mueller [MVP]  
View profile  
 More options Nov 5 2009, 4:35 pm
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

"Tony Logan" <TonyLo...@discussions.microsoft.com> wrote in message

news:1DEEB21F-7A24-4299-B297-E8E5E34C0BEF@microsoft.com...

> My script sometimes quits on this line:
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> strCompName & "\root\default:StdRegProv")

> The script is for installing the Microsoft SCCM client to a group of
> remote
> PCs. The script checks if the remote PC can be pinged, checks the local PC
> for the necessary installation files, and copies whichever files are
> needed
> to the remote PC. Remote PCs can either already have the SCCM client, the
> SMS
> client (the previous version of SCCM), or neither client. If either the
> 2nd
> or 3rd case are true, the SCCM client gets installed on the remote PC. The
> script reports the results to a log file and runs against multiple PCs by
> reading a txt file.

> It works fine most of the time, but every so often it bombs at the line I
> noted above. As an alternative I tried this:
> Set objReg = GetObject("winmgmts:\\" & strCompName &
> "\root\default:StdRegProv")

> But that produced the same result: the script gets to that line and quits
> running instead of continuing on to the rest of the script or going to the
> next PC.

> I added "On Error Resume Next" to the file to allow the script to continue
> if it finds a PC it can't ping. But even when I comment that out, the code
> errors on the lines above and then exits. The error message says
> "Permission
> denied: GetObject. The remote server has been paused or is in the process
> of
> being restarted."

> All the PCs are Windows XP, Service Pack 2, Office 2003.

On some clients it might help to use:

Set objReg = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
    & strCompName & "\root\cimv2")

If that doesn't work, then possibly a firewall is blocking. The following
command at a command prompt on the problem PC should unblock:

netsh firewall set service remoteadmin enable

Finally, WMI can become corrupt. I have used the following links to help
troubleshoot:

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
winmgmt /kill
winmgmt /unregserver
winmgmt /regserver
winmgmt /resyncperf

http://msdn.microsoft.com/en-us/library/aa389286(VS.85).aspx

I hope this helps.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


    Forward  
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.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google