Error running remote process with WMI
- From: jose.manuel.miranda@xxxxxxxxx
- Date: 12 Dec 2006 05:54:58 -0800
Hi, I have the next code, and when I try to run get this error:
Error de Microsoft VBScript en tiempo de ejecución:
El objeto no acepta esta propiedad o método:
'Methods_(...).InParameters.SpawnInstance_objProgram'
What's the problem? Can't I run a remote process??
Const WbemAuthenticationLevelPktPrivacy = 6
strUsuario= "SRV1\administrador"
strPass= "password"
strPrograma = "notepad.exe"
strComputer = "SRV1"
' Conexión a WMI
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIServicio = objwbemLocator.ConnectServer (strComputer,
"root\cimv2", strUsuario, strPass)
objWMIServicio.Security_.authenticationLevel =
WbemAuthenticationLevelPktPrivacy
' Obtiene la clase Win32_Process
Set objProceso = objWMIServicio.Get("Win32_Process")
Set objPrograma =
objProceso.Methods_("Create").InParameters.SpawnInstance_objProgram.CommandLine
= strPrograma
'Ejecuta el programa.
'Set strShell = objWMIService.ExecMethod("Win32_Process", "Create",
objPrograma)
.
- Follow-Ups:
- Re: Error running remote process with WMI
- From: Manfred Senn
- Re: Error running remote process with WMI
- Prev by Date: Re: Winmgmt.exe process on DC hits 100% CPU in task manager
- Next by Date: Re: Error running remote process with WMI
- Previous by thread: Winmgmt.exe process on DC hits 100% CPU in task manager
- Next by thread: Re: Error running remote process with WMI
- Index(es):
Loading