使用powershell加载可执行文件,但exe不读取.config文件

时间:2015-08-12 04:13:30

标签: powershell

我正在尝试使用PowerShell加载CRM Plugin tool

我正在使用调用start-process" D:\ PluginTool2011 \ PluginRegistration.exe"加载工具正常但不读取存储已保存连接的关联.config文件,然后将其加载到工具中

有没有办法使用powershell我可以调用exe并让它读取配置文件?

编辑:包含连接设置的配置文件被称为connections.config而不是PluginRegistration.exe.config。

1 个答案:

答案 0 :(得分:1)

将-WorkingDirectory D:\ PluginTool2011添加到Start-Process,假设该工具从当前工作目录中读取配置文件。

start-process "D:\PluginTool2011\PluginRegistration.exe" -WorkingDirectory D:\PluginTool2011