0

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()
4

2 に答える 2

0
Process compiler = new Process();
compiler.StartInfo.FileName = sExeName;
compiler.StartInfo.Arguments = sParameters;
compiler.StartInfo.UseShellExecute = false;
compiler.StartInfo.RedirectStandardOutput = true;
compiler.Start();
Console.WriteLine(compiler.StandardOutput.ReadToEnd());
于 2012-10-06T03:08:49.170 に答える