This is my first attempt ever at a program in C#. Here's what I have so far:
using System;
using Microsoft.Win32;
class reg
{
static void Main()
{
RegistryKey hklm =Registry.LocalMachine;
hklm=hklm.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
Object obp=hklm.GetValue("Identifier");
Console.WriteLine("Processor Identifier:{0}",obp);
RegistryKey hklp =Registry.LocalMachine;
hklp=hklp.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
Object obc=hklp.GetValue("VendorIdentifier");
Console.WriteLine("Vendor Identifier:{0}",obc);
RegistryKey biosv =Registry.LocalMachine;
biosv=biosv.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\MultiFunctionAdapter\\4");
Object obv=biosv.GetValue("Identifier");
Console.WriteLine("Bios Status:{0}",obv);
RegistryKey biosd =Registry.LocalMachine;
biosd=biosd.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\");
Object obd=biosd.GetValue("SystemBiosDate");
Console.WriteLine("Bios Date:{0}",obd);
RegistryKey bios =Registry.LocalMachine;
bios=bios.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\");
Object obs=bios.GetValue("Identifier");
Console.WriteLine("System Identifer:{0}",obs);
string x = Console.ReadLine();
}
}
I want this program to grab these registry keys and place them into a notepad file. Right now all it does is open a dos window and place them in there. How can I go about getting them to open notepad and place them in there?