从 vb.net 执行 AutoIt 脚本时,没有应用程序与此操作的指定文件关联
我已经在我的机器上安装了 AutoIt。它在一台机器上工作正常,但相同的配置和代码在其他机器上不起作用。知道我缺少什么吗?
出现以下错误
Could not start process Z:\test\AutoItScripts\test.au3
No application is associated with the specified file for this operation
autoit 脚本也从命令行成功执行。它只是在使用以下代码执行时出现此错误
objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.Verb = "runas"
objProcess.StartInfo.Arguments = Argument
objProcess.StartInfo.FileName = ProcessPath
objProcess.Start()
'Wait until it's finished
objProcess.WaitForExit()
'Exitcode as String
Console.WriteLine(objProcess.ExitCode.ToString())
objProcess.Close()
I have installed AutoIt on my machine. Its working ok on one machine but same configuration and code is not working on other. Any idea what I am missing?
Following error
Could not start process Z:\test\AutoItScripts\test.au3
No application is associated with the specified file for this operation
Also autoit script successfully executes from command line. Its just getting this error while using the following code to execute
objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.Verb = "runas"
objProcess.StartInfo.Arguments = Argument
objProcess.StartInfo.FileName = ProcessPath
objProcess.Start()
'Wait until it's finished
objProcess.WaitForExit()
'Exitcode as String
Console.WriteLine(objProcess.ExitCode.ToString())
objProcess.Close()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于 AutoIt3 脚本本身不可执行,因此您需要使用 shellexecute。
Because AutoIt3 scripts are not themselves executable, you will need to be using shellexecute.