Tambahkan komponen-kompunen berikut ini pada form:
Ketikan listing berikut:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
namespace regedit_bajakan
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void breged_Click(object sender, EventArgs e)
{
RegistryKey buka = Registry.LocalMachine;
RegistryKey namaOS = buka.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion");
RegistryKey procesor = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
RegistryKey arsitektur = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
RegistryKey motherboard = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\BIOS");
Ios.Text = Convert.ToString(namaOS.GetValue("ProductName"));
Iprocessor.Text = Convert.ToString(procesor.GetValue("ProcessorNameString"));
Iarsitektur.Text = Convert.ToString(arsitektur.GetValue("Identifier"));
Imotherboard.Text = Convert.ToString(motherboard.GetValue("BaseBoardManufacturer"));
}
}
}
Tampilan Listing:
Di bawah ini merupakan hasil setelah program di jalankan :