Re: Error running remote process with WMI
- From: "Manfred Senn" <msenn@xxxxxxxxxxxxx>
- Date: Wed, 13 Dec 2006 08:23:46 -0000
Hello Jose,
it was apleasure for me.
Manfred
<jose.manuel.miranda@xxxxxxxxx> schrieb im Newsbeitrag
news:1165994830.246940.115090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Oh !!! Thats work !!
Thanks very much.
Manfred Senn ha escrito:
Try:
' Obtiene la clase Win32_Process
Set objProceso = objWMIServicio.Get("Win32_Process")
iProcessId = CInt(objProceso.Create(strPrograma))
<jose.manuel.miranda@xxxxxxxxx> schrieb im Newsbeitrag
news:1165931698.184504.100840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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)
.
- References:
- Error running remote process with WMI
- From: jose . manuel . miranda
- Re: Error running remote process with WMI
- From: Manfred Senn
- Re: Error running remote process with WMI
- From: jose . manuel . miranda
- Error running remote process with WMI
- Prev by Date: Re: Error running remote process with WMI
- Next by Date: Remote Execution - Show on screen
- Previous by thread: Re: Error running remote process with WMI
- Next by thread: How to match keys/qualifiers for two instances of two different classes
- Index(es):
Relevant Pages
|