と意気込みがあったので、レジストリの情報を取得するサンプル。
一部分だけですが、他にも色々と取得可能です。
その辺は徐々に記載して行ければと思います。
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Win32; class Program { static void Main(string[] args) { PrinterData.GetPrinters().ForEach(p => Console.WriteLine(p)); Console.ReadKey(); } } public class PrinterData { public static List<PrinterData> GetPrinters() { const string path = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers"; RegistryKey key = Registry.LocalMachine.OpenSubKey(path); return ( from name in key.GetSubKeyNames() select new PrinterData(key.OpenSubKey(name))).ToList(); } public string Name { get; private set; } public string Location { get; private set; } public string Description { get; private set; } public string DriverName { get; private set; } public PrinterData(RegistryKey key) { this.Name = Convert.ToString(key.GetValue("Name")); this.Location = Convert.ToString(key.GetValue("Location")); this.Description = Convert.ToString(key.GetValue("Description")); using (var dsSpooler = key.OpenSubKey("DsSpooler")) { this.DriverName = Convert.ToString(dsSpooler.GetValue("driverName")); } } public override string ToString() { var builder = new StringBuilder(); builder.AppendLine(" ................................................... "); builder.AppendLine(" プリンタ名 ....... " + this.Name); builder.AppendLine(" 場所 ............. " + this.Location); builder.AppendLine(" コメント ......... " + this.Description); builder.AppendLine(" ドライバ名 ....... " + this.DriverName); return builder.ToString(); } }