获得ArcMap的版本
作者:互联网
private void button1_Click(object sender, EventArgs e) { string path = @"C:\Program Files (x86)\ArcGIS\Desktop10.8\bin\ArcMap.exe"; //@"C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe"; //Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MainApp.exe"); MessageBox.Show(GetVersion(path)); } public string GetVersion(string path) { string version = string.Empty; FileVersionInfo file = System.Diagnostics.FileVersionInfo.GetVersionInfo(path); //版本号显示为“主版本号.次版本号.内部版本号.专用部件号”。 //version = String.Format("{0}.{1}.{2}.{3}", file.FileMajorPart, file.FileMinorPart, file.FileBuildPart, file.FilePrivatePart); //使用文件版本信息 version = file.FileVersion; return version; }
标签:exe,版本,版本号,获得,version,ArcMap,file,path,string 来源: https://www.cnblogs.com/gisoracle/p/16193215.html