使用 script.exe 运行 vb 脚本
我想使用 cscript.exe 运行 vbscript 文件。 我搜索了很多,但没有找到任何方法,而我可以使用 cmd 和 cscript.exe 运行我的脚本,
这是我的代码
Process p = new Process();
p.StartInfo.Arguments = @"C:\\Program Files\\VDIWorkLoad\\WorkLoadFile\\open test.vbs";
p.StartInfo.FileName = "testing";
p.StartInfo.UseShellExecute = false;
try
{
p.Start();
p.WaitForExit();
Console.WriteLine("Done.");
}
,知道如何使用 cscript.exe
I want to run vbscript file using cscript.exe.
i searched a lot but did'nt found any way while i can run my script using cmd with cscript.exe
this is my code
Process p = new Process();
p.StartInfo.Arguments = @"C:\\Program Files\\VDIWorkLoad\\WorkLoadFile\\open test.vbs";
p.StartInfo.FileName = "testing";
p.StartInfo.UseShellExecute = false;
try
{
p.Start();
p.WaitForExit();
Console.WriteLine("Done.");
}
any idea how i can use cscript.exe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将 FileName 属性设置为要运行的可执行文件。在您的情况下,这将是
cscript.exe
而不是testing
:You should set the FileName property to the executable you want to run. In your case that would be
cscript.exe
and nottesting
: