![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Error 2 when creating an object I have a script that is launching an application similar to below: strComputer = "." Set objWMIService = GetObject ("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process") Err = objWMIService.Create("Notepad.exe", Null, Null, intProcessID) wscript.echo "Error # " & Err & vbCrLf & Err.Description When I try to create the object I get Error 2. Now I know that it has to do with the hardening scripts. Is there a quick way to tell whether this is a Registry issue, OS Permissions or DCOM permissions? Any help would be greatly appreciated. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Error 2 when creating an object "Joe" <Joe@xxxxxx> wrote in message news 08C9AFE-EC5C-4D26-AEF8-F32233846F85@xxxxxxQuote: >I have a script that is launching an application similar to below: > > strComputer = "." > Set objWMIService = GetObject ("winmgmts:\\" & strComputer & > "\root\cimv2:Win32_Process") > Err = objWMIService.Create("Notepad.exe", Null, Null, intProcessID) > wscript.echo "Error # " & Err & vbCrLf & Err.Description > > When I try to create the object I get Error 2. > > Now I know that it has to do with the hardening scripts. Is there a quick > way to tell whether this is a Registry issue, OS Permissions or DCOM > permissions? > > Any help would be greatly appreciated. Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ & strComputer & "\root\cimv2:Win32_Process") Next, for troubleshooting WMI see these links: 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 -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Creating XPathDocument object in Powershell | PowerShell | |||
| Problem with ActiveX creating object on IE 7 in Vista | Vista General | |||
| Creating an array of floats using new-object | PowerShell | |||
| False IE doc body error - "Object reference not set to an instance of an object" | PowerShell | |||
| Adding canonical aliases for Compare-Object, Measure-Object, New-Object | PowerShell | |||