开发者

C# System.Diagnostics.Process.Start() parameters

Anyone know where a computer keeps what parameters it can accept through this function? For example, I'd like to know what I can send to Winword.exe (开发者_开发百科Microsoft Word). Or is there an online list of what programs work here?


There's no standard means to query available command line parameters in executables. That's why you have to look online for published lists. For example Microsoft Word.

The Process.Start(..) overloaded methods pass various data into the process but cannot extract it because of the proprietary nature how a Process uses this info.

If you started the processes then Process.StartInfo may provide some useful information about how it was started (but does not reflect possibilities), and won't work as intended if you're just grabbing a process from memory that you didn't start.

Although it's customary for many Windows processes to allow /? to produce a list of parameters, and many systems use -help, /help or --help, etc, the output of even those may differ and be tough to consistently parse for discovery purposes.


Here is a list of accepted arguments for winword.exe Args list.


The command line arguments that an application accepts isn't stored anywhere on your hard drive, unless if there's specific documentation that came along with that product. That being said, google will be your best friend for this. Any app you think can be launched from the command line using different parameters, will have some info on the net.


you can either go to your application's help and find it there, or you can ask good old mr. Google to help you. if you are looking for Windows Word's args list, you can search for it on the support page of Microsoft. I believe there might be some changes from version to version.


Unix has a built-in documentation system for this: man pages. This is just one feature of Unix based OSs that shows how programmer-oriented it is (not a bad thing). Another would be the profileration of packaging and dependency systems.

Alas, no such standard exists for Windows.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜