Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created April 28, 2014 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-plus/11364218 to your computer and use it in GitHub Desktop.
Save r-plus/11364218 to your computer and use it in GitHub Desktop.
host = "192.168.0.1"
user = "user"
password = "password"
batch_path = "C:\Users\user\echo.bat"
Const WbemAuthenticationLevelPktPrivacy = 6
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objWbemLocator.ConnectServer(host, "root\cimv2", user, password, "", "")
objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
Set objWin32_Process = objWMIService.Get("Win32_Process")
errReturn = objWin32_Process.Create(batch_path,null,null,intProcessID)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment