P
Patrick.Simons
The following VB6-Code shout remotely open notepad. Instead the process
is created on the remote-PC but notepad remains invisible.
Any ideas??
Const SW_SHOW = 5
Dim oWMIService As Object
Dim oStartup As WbemScripting.SWbemObject
Dim oConfig As Object
Dim oProcess As Object
Set oWMIService = GetObject
("winmgmts:impersonationLevel=impersonate}!\\" _
& sRemotePC & "\root\cimv2")
Set oStartup = oWMIService.Get("Win32_ProcessStartup")
Set oConfig = oStartup.SpawnInstance_
oConfig.ShowWindow = SW_SHOW
Set oProcess = oWMIService.Get("Win32_Process")
iErrRc = oProcess.Create(sProcess, Null, oConfig, iProcessID)
is created on the remote-PC but notepad remains invisible.
Any ideas??
Const SW_SHOW = 5
Dim oWMIService As Object
Dim oStartup As WbemScripting.SWbemObject
Dim oConfig As Object
Dim oProcess As Object
Set oWMIService = GetObject
("winmgmts:impersonationLevel=impersonate}!\\" _
& sRemotePC & "\root\cimv2")
Set oStartup = oWMIService.Get("Win32_ProcessStartup")
Set oConfig = oStartup.SpawnInstance_
oConfig.ShowWindow = SW_SHOW
Set oProcess = oWMIService.Get("Win32_Process")
iErrRc = oProcess.Create(sProcess, Null, oConfig, iProcessID)