Commit a52ec000 authored by tsuji's avatar tsuji

.batファイル参照の方法をカレントディレクトリの取得からモジュールパスの取得に変更

parent 7a73afe9
......@@ -57,8 +57,9 @@ namespace GetADoc
//コンソール呼び出し
ProcessStartInfo processStartInfo = new ProcessStartInfo();
string stCurrentDir = System.IO.Directory.GetCurrentDirectory();
processStartInfo.FileName = System.IO.Path.Combine(stCurrentDir, "getADoc.Data", "getADoc.bat");
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //モジュールのパスを取得
string appDirectory = appPath.Substring(0, appPath.LastIndexOf(@"\") + 1); //モジュールの存在するディレクトリを取得
processStartInfo.FileName = System.IO.Path.Combine(appDirectory, "getADoc.Data", "getADoc.bat");
processStartInfo.CreateNoWindow = true; // コマンドプロンプトを非表示
processStartInfo.UseShellExecute = false; // シェル機能オフ
......
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment