![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | connecting to remote registry not working sometimes 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. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: connecting to remote registry not working sometimes "Tony Logan" <TonyLogan@newsgroup> wrote in message news:1DEEB21F-7A24-4299-B297-E8E5E34C0BEF@newsgroup Quote: > 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. 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/scr.../help/wmi.mspx http://support.microsoft.com/kb/875605 http://www.microsoft.com/technet/scr...es/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/libr...86(VS.85).aspx I hope this helps. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Remote Assistance Not Connecting | Vista networking & sharing | |||
| Re: Remote registry | PowerShell | |||
| Remote registry | PowerShell | |||
| getting remote registry | PowerShell | |||
| Remote Registry | PowerShell | |||