http://bugs.winehq.org/show_bug.cgi?id=33618
Bug #: 33618 Summary: wmi query should support querying Process Name (inside wbemprox) Product: Wine Version: 1.5.30 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wmi&wbemprox AssignedTo: wine-bugs@winehq.org ReportedBy: rosen.diankov@gmail.com Classification: Unclassified
Many people use the following construct to get the command line parameters a process was instantiated with:
"SELECT CommandLine FROM Win32_Process WHERE Name='someprocess'"
http://stackoverflow.com/questions/6264453/how-to-construct-wmi-query
The problem is that the current wmi querying does not support getting process name. In fact very few of the Win32_Process parameters are supported.
In order to support at least Name, I'm guessing the following is necessary:
1. in dlls/wbemprox/builtin.c col_process array, add an entry for prop_nameW
2. in dlls/wbemprox/builtin.c record_process structure, add "const WCHAR *name;"
3. in dlls/wbemprox/builtin.c fill_process function, add a line that initializes rec->name from the current process name.