Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main(int argc, char* argv[])
- {
- ofstream cmdLine;
- cmdLine.open("cmdline.txt");
- for (int i = 0; i < argc; i++) {
- cmdLine << argv[i];
- if (i < argc)
- cmdLine << " ";
- }
- cmdLine.close();
- return 0;
- }
- require 'win32ole'
- wmi = WIN32OLE.connect("winmgmts://")
- processes = wmi.ExecQuery("select * from win32_process")
- for process in processes do
- cmdLine = process.CommandLine
- puts "Command line: #{cmdLine}" if cmdLine =~ /mxmlc/
- end
- puts "Command line: #{cmdLine}" if cmdLine =~ /mxmlc/
Add Comment
Please, Sign In to add comment