2017-09-11 13 views
2

実行可能プログラムを開発してローカルマシンに展開しました。また、ASP.NET Webアプリケーションを開発し、サーバーに展開しました。 ASP.NET Webアプリケーションは、ActiveXObject(Javascript)を使用してローカルマシン上の実行可能プログラムを呼び出すことができ、プログラムは正常に動作します。しかし、私は、実行可能プログラムがローカルマシンではなくサーバー上で実行されることに気付きました。ActiveXObjectを使用してサーバー上ではなく、クライアントマシン上で実行可能(exe)プログラムを実行します。

実行可能プログラムは、サーバーではなくクライアントマシンで実行できますか?アクティブの

+0

不可能ではありません –

答えて

1

Instedは......それの表情をuを助けるかもしれない

using System.Diagnostics; 

    //Get path of the system folder. 
    string sysFolder = 
    Environment.GetFolderPath(Environment.SpecialFolder.System); 
    //Create a new ProcessStartInfo structure. 
    ProcessStartInfo pInfo = new ProcessStartInfo(); 
    //Set the file name member. 
    pInfo.FileName = sysFolder + @"\eula.exe"; 
    //UseShellExecute is true by default. It is set here for illustration. 
    pInfo.UseShellExecute = true; 
    Process p = Process.Start(pInfo); 

//または

System.Diagnostics.Process.Start("iexplore.exe") 

または

System.Diagnostics.Process.Start(@"c:\nes\nes.exe"); 

または

を持っています
System.Diagnostics.Process.Start(Server.MapPath("`/SanScan.exe")); 
関連する問題