【发布时间】:2015-10-21 19:20:01
【问题描述】:
我在我的项目资源中添加了 script3.ps1 文件。 我构建了 dll 文件。
我想用 script.ps1 启动一个 powershell 进程。 我试过了
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "powershell.exe",
Arguments = "-ExecutionPolicy ByPass -Command \".'"+MyProject.Properties.Resources.script3+"'",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
我收到了错误:
the term 'system.byte[]' is not recognized as the name of a cmdlet,
function, script file or operable program. check the spelling of the name, or if
a path was included, verify that path is correct and try again. at line : 1 char
【问题讨论】:
标签: c# powershell dll process resources