FullyQualifiedErrorId:PositionalParameterNotFound、Microsoft.PowerShell.Commands.StartProcessCommand

问题描述 投票:0回答:1

在 PowerShell 中执行此行后出现错误:

Start-Process -FilePath "MSACCESS.EXE" "C:\Test.accdb" -ArgumentList 'initFile="C:\myFile.ini"'

错误:

FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand 

我尝试更正 ArgumentList。我该如何修复这个错误?

powershell
1个回答
0
投票

您将两个不同的值传递到

-FilePath
参数中。这似乎是错误的。

没有更多关于你想要做什么的信息,我只能假设你的命令应该写成

Start-Process -FilePath "MSACCESS.EXE" -ArgumentList 'C:\Test.accdb', 'initFile="C:\myFile.ini"'

这更有意义,因为您将数据库和配置文件作为参数传递给 MS Access 调用。

© www.soinside.com 2019 - 2024. All rights reserved.