2013-02-27から1日間の記事一覧

.NETでWMIを用いてOSのバージョン情報、Hotfix、ドライブ情報を取得する

まず、System.Managementの参照を追加してから。 using System; using System.IO; using System.Linq; using System.Management; class Program { private static string remoteUserName; private static string remotePassword; private static string remo…

【.NET】【C#】レジストリからExcelのバージョン取得する

using Microsoft.Win32; using System; class Program { static void Main(string[] args) { try { var keyData = ""; using (var regKey = Registry.ClassesRoot.OpenSubKey(@"Excel.Application\CurVer")) { if (regKey != null) keyData = regKey.GetValu…