Using VB and WMI you can run a process on any remote system on your network. The only requirements are that you have WMI on your system and you have Administrative prividgles on the remote system too.
When you run this you will get a return value of 0 for success and a process id which you can verify by logging into the remote system and looking in the task manager process' list.
Gangsta Yoda™VB Code:
Option Explicit 'Copyright © 2005 by RobDog888 (VB/Office Guru™). All Rights reserved. ' 'Distribution: You can freely use this code in your own ' applications provided that this copyright ' is left unchanged, but you may not reproduce ' or publish this code on any web site, online ' service, or distribute as source on any ' media without express permission. ' Private Sub Command1_Click() On Error Resume Next Dim oProcess As Object Dim lProcessID As Long Dim lRet As Long Set oProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\MyServer\root\cimv2:Win32_Process") 'Or 'Set oProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\\MyServer.MyDomain.com\root\cimv2:Win32_Process") lRet = oProcess.Create("Notepad", Null, Null, lProcessID) MsgBox "Method returned result: " & lRet & vbNewLine & "Id of new process: " & lProcessID, vbOKOnly + vbInformation End Sub®





Reply With Quote