Reputation: 63
I am planning to use WMI to start a process on a remote machine(say batch process). But the process was designed to start with Command Line Argument (say Batch_Type_Code). I couldn't find any sample that uses command line arguments.
Upvotes: 4
Views: 3889
Reputation: 22251
According to the documentation for Win32_Process.Create
, the command line argument includes both the path to the executable and the arguments:
Create("\"%SYSTEMROOT%\\system32\\cmd.exe\" /K \"echo multiple spaces here\"", null, null, null);
Upvotes: 9