「\\ProgramFiles\\myApp」のようなアプリのパスを取得したいので、次のコードを使用しようとします。
string path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
しかし、最後に「\\myapp.exe」を含むパスが返されます。
私も試しました:
string path = System.IO.Directory.GetCurrentDirectory();
しかし、「NotSupportedException」がスローされます。
最後に.exeなしでパスを取得する方法はありますか?