我们使用的软件能够将脚本用于不同的任务。
在一个脚本中,我想启动一个小帮助工具来输入一些额外的数据。因此,我需要知道下图所示的调用软件的命令行参数。
是否有可能从调用过程中获取这些内容,或者至少通过查找"图像名称"来获取它们?
答案 0 :(得分:0)
将Wapac的评论链接与this问题中的Simon Mourier的答案相结合,解决了这个问题。
现在我有两个辅助类:
在我的程序中,我只需要立即致电:
Process process = Process.GetCurrentProcess();
Process parent = ParentProcessUtilities.GetParentProcess(process.Id);
String[] parameters = CommandLineUtilities.getCommandLinesParsed(parent);