Hello everyone,
I need to build a tool to make installation of a new windows7 workstation easier.
It has to change to computername the username and the password.
And if it's possible set the licencekey.
I dont know where to start can anyone help me?
With regards.
Loading

Manikavelu VelayuthamRank #413 · 6K reputationPosted Aug 24, 2010, 1:35 AM EDT
Example:
ObjectQuery oQuery = new System.Management.ObjectQuery("select MACAddress, IPAddress from Win32_NetworkAdapterConfiguration");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oObjColl = oSearcher.Get();
Above code is used to get the MAC address of a machine. Like this you can get or set the value of any computer.
Sander Groen12 reputationPosted Aug 24, 2010, 2:07 AM EDT
This is what i have right now and i get namespace errors.
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 System.Management; namespace Computernaam { public partial class Form1 : Form { ObjectQuery oQuery = new System.Management.ObjectQuery("select MACAddress, IPAddress from Win32_NetworkAdapterConfiguration"); ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery); ManagementObjectCollection oObjColl = oSearcher.Get(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { } } }Manikavelu VelayuthamRank #413 · 6K reputationPosted Aug 24, 2010, 2:27 AM EDT
Sander Groen12 reputationPosted Aug 24, 2010, 3:09 AM EDT
Let's give it a try :)