获取浏览器信息(默认浏览器)? 电脑上有火狐和IE浏览器,火狐是默认浏览器如何获取火狐浏览器版本信息?高手指点,最好有代码贴出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 通过注册表找到火狐的路径 private void Form1_Load(object sender, EventArgs e) { System.Diagnostics.FileVersionInfo FileVer = System.Diagnostics.FileVersionInfo.GetVersionInfo(@"D:\Program Files\Mozilla Firefox\firefox.exe"); MessageBox.Show(FileVer.FileVersion); } private void Form1_Load(object sender, EventArgs e) { Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot; Microsoft.Win32.RegistryKey key1 = key.OpenSubKey(@"http\shell\open\command", true); MessageBox.Show(key1.GetValue("").ToString()); } "C:\Program Files\Internet Explorer\IEXPLORE.EXE" -nohome 上面是获取的结果,能获取到具体的版本号吗? Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot; Microsoft.Win32.RegistryKey key1 = key.OpenSubKey(@"http\shell\open\command",false); string fullPath = key1.GetValue("").ToString(); int endIndex = fullPath.ToLower().IndexOf(".exe"); string FileName = fullPath.Substring(1, endIndex).Replace(@"\","/") + "exe"; System.Diagnostics.FileVersionInfo FileVer = System.Diagnostics.FileVersionInfo.GetVersionInfo(FileName); Response.Write("<br />"+FileVer.FileName+"=========="+key1.GetValue("").ToString()+";=============<br />"); Response.Write("FileVer.Comments--" + FileVer.Comments + "<br />"); Response.Write("FileVer.CompanyName--" + FileVer.CompanyName + "<br />"); Response.Write("FileVer.FileDescription--" + FileVer.FileDescription + "<br />"); Response.Write("FileVer.FileMajorPart--" + FileVer.FileMajorPart + "<br />"); Response.Write("FileVer.FileMinorPart--" + FileVer.FileMinorPart + "<br />"); Response.Write("FileVer.FileName--" + FileVer.FileName + "<br />"); Response.Write("FileVer.FilePrivatePart--" + FileVer.FilePrivatePart + "<br />"); Response.Write("FileVer.FileVersion--" + FileVer.FileVersion + "<br />"); Response.Write("FileVer.InternalName--" + FileVer.InternalName + "<br />"); Response.Write("FileVer.OriginalFilename--" + FileVer.OriginalFilename + "<br />"); Response.Write("FileVer.PrivateBuild--" + FileVer.PrivateBuild + "<br />"); Response.Write("FileVer.ProductBuildPart--" + FileVer.ProductBuildPart + "<br />"); Response.Write("FileVer.ProductMajorPart--" + FileVer.ProductMajorPart + "<br />"); Response.Write("FileVer.ProductMinorPart--" + FileVer.ProductMinorPart + "<br />"); Response.Write("FileVer.ProductName--" + FileVer.ProductName + "<br />"); Response.Write("FileVer.ProductPrivatePart--" + FileVer.ProductPrivatePart + "<br />"); Response.Write("FileVer.ProductVersion--" + FileVer.ProductVersion + "<br />"); Response.Write("FileVer.SpecialBuild--" + FileVer.SpecialBuild + "<br />"); Microsoft.Win32.RegistryKey key1 = key.OpenSubKey(@"http\shell\open\command",true);好像沒權寫入,設成false獲取不正確 Infragistics35 9.2 版本如何升级到10.3? ASP.NET 2个web.config合并问题!!!!!!! 在没有任何数据时进行无效的读取尝试 求JAVA书 求javascript,在点击按钮后,清除页面里的两个textbox的值 导出数据遇到的奇怪问题 一夜未睡,这个正则搞不定。 dataGrid不能用百分比作宽度的吗? aspx+js连接SQL2005,可以不要DLL吗? dataset中怎么得到某一行某一列的值? asp.net2.0中treeview自动选择指定节点的问题 怎么能在DataList中取出控件Image的值?
private void Form1_Load(object sender, EventArgs e)
{
System.Diagnostics.FileVersionInfo FileVer = System.Diagnostics.FileVersionInfo.GetVersionInfo(@"D:\Program Files\Mozilla Firefox\firefox.exe");
MessageBox.Show(FileVer.FileVersion);
}
{
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot;
Microsoft.Win32.RegistryKey key1 = key.OpenSubKey(@"http\shell\open\command", true);
MessageBox.Show(key1.GetValue("").ToString());
}
上面是获取的结果,能获取到具体的版本号吗?
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot;
Microsoft.Win32.RegistryKey key1 = key.OpenSubKey(@"http\shell\open\command",false);
string fullPath = key1.GetValue("").ToString();
int endIndex = fullPath.ToLower().IndexOf(".exe");
string FileName = fullPath.Substring(1, endIndex).Replace(@"\","/") + "exe";
System.Diagnostics.FileVersionInfo FileVer = System.Diagnostics.FileVersionInfo.GetVersionInfo(FileName); Response.Write("<br />"+FileVer.FileName+"=========="+key1.GetValue("").ToString()+";=============<br />");
Response.Write("FileVer.Comments--" + FileVer.Comments + "<br />");
Response.Write("FileVer.CompanyName--" + FileVer.CompanyName + "<br />");
Response.Write("FileVer.FileDescription--" + FileVer.FileDescription + "<br />");
Response.Write("FileVer.FileMajorPart--" + FileVer.FileMajorPart + "<br />");
Response.Write("FileVer.FileMinorPart--" + FileVer.FileMinorPart + "<br />");
Response.Write("FileVer.FileName--" + FileVer.FileName + "<br />");
Response.Write("FileVer.FilePrivatePart--" + FileVer.FilePrivatePart + "<br />");
Response.Write("FileVer.FileVersion--" + FileVer.FileVersion + "<br />");
Response.Write("FileVer.InternalName--" + FileVer.InternalName + "<br />");
Response.Write("FileVer.OriginalFilename--" + FileVer.OriginalFilename + "<br />");
Response.Write("FileVer.PrivateBuild--" + FileVer.PrivateBuild + "<br />");
Response.Write("FileVer.ProductBuildPart--" + FileVer.ProductBuildPart + "<br />");
Response.Write("FileVer.ProductMajorPart--" + FileVer.ProductMajorPart + "<br />");
Response.Write("FileVer.ProductMinorPart--" + FileVer.ProductMinorPart + "<br />");
Response.Write("FileVer.ProductName--" + FileVer.ProductName + "<br />");
Response.Write("FileVer.ProductPrivatePart--" + FileVer.ProductPrivatePart + "<br />");
Response.Write("FileVer.ProductVersion--" + FileVer.ProductVersion + "<br />");
Response.Write("FileVer.SpecialBuild--" + FileVer.SpecialBuild + "<br />");