2020-05-07 01:42:52 +02:00
|
|
|
'
|
|
|
|
' This script uses WMI class' Win32_Process static method Create to
|
|
|
|
' execute given command in a hidden window (ShowWindow = 12).
|
|
|
|
'
|
2021-10-24 23:11:42 +02:00
|
|
|
' Mariusz Banach / mgeeky, <mb@binary-offensive.com>
|
2020-05-07 01:42:52 +02:00
|
|
|
' (https://github.com/mgeeky)
|
|
|
|
'
|
|
|
|
|
|
|
|
command = "notepad.exe"
|
|
|
|
computer = "."
|
|
|
|
|
|
|
|
Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
|
|
|
|
& computer & "\root\cimv2")
|
|
|
|
|
|
|
|
Set startup = wmi.Get("Win32_ProcessStartup")
|
|
|
|
Set conf = startup.SpawnInstance_
|
|
|
|
conf.ShowWindow = 12
|
|
|
|
|
|
|
|
Set proc = GetObject("winmgmts:root\cimv2:Win32_Process")
|
2020-05-06 19:22:32 +02:00
|
|
|
proc.Create command, Null, conf, intProcessID
|