开发者

How to get process Commandline Parameters on Windows 2000 using C#

开发者 https://www.devze.com 2022-12-29 20:29 出处:网络
How to get process Comma开发者_开发百科ndline Parametersat Windows 2000 using C#? I\'m use WMI query :select ExecutablePath,CommandLine from Win32_Process where Name=\'test\'

How to get process Comma开发者_开发百科ndline Parameters at Windows 2000 using C#?

I'm use WMI query :select ExecutablePath,CommandLine from Win32_Process where Name='test' but windows 2000 throw this exception: system.management.managementexception : invalid query.

so I do not know how to do it work in windows 2000,please help me, Thank you!


The CommandLine-property exists since Windows XP (msdn source):

CommandLine
Data type: string
Access type: Read-only
Command line used to start a specific process, if applicable. This property is new for Windows XP.

Related SO question: WMI error with a simple query in C#

0

精彩评论

暂无评论...
验证码 换一张
取 消