Here is the new version of getMacAddress() i just wrote. It’s untested, see how you go.
[code] public ArrayList getMacAddress()
{
// Variables
ArrayList alMacs = new ArrayList();
try
{
// Get all network interaces
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
// Iterate all network interaces
foreach (NetworkInterface adapter in adapters)
{
// Get IP Properties
IPInterfaceProperties properties = adapter.GetIPProperties();
// Push MAC address into array
alMacs.Add( adapter.GetPhysicalAddress().ToString() );
// DEBUG
//log("N/A", "Found network interface: Name: " + adapter.Description + ", MAC: " + adapter.GetPhysicalAddress().ToString());
}
}
catch (Exception e)
{
log("N/A", e.Message);
}
return alMacs;
}[/code]
I have attached a compiled DLL, give it a shot and let me know how it goes.
EDIT: I’ve tested this and it worked as intended.
[code] 30/08/2012 1:48 PM FOG::MODDebug Reading config settings…
30/08/2012 1:48 PM FOG::MODDebug Reading of config settings passed.
30/08/2012 1:48 PM FOG::MODDebug Starting Core processing…
30/08/2012 1:48 PM FOG::MODDebug Operating System ID: 6
30/08/2012 1:48 PM FOG::MODDebug Operating System Minor: 1
30/08/2012 1:48 PM FOG::MODDebug MAC ID 0 BC:5F:F4:49:96:63
30/08/2012 1:48 PM FOG::MODDebug MAC ID 1 00:50:56:C0:00:01
30/08/2012 1:48 PM FOG::MODDebug MAC ID 2 00:50:56:C0:00:08
30/08/2012 1:48 PM FOG::MODDebug MAC POST String: BC:5F:F4:49:96:63|00:50:56:C0:00:01|00:50:56:C0:00:08
30/08/2012 1:48 PM FOG::MODDebug A user is currently logged in
30/08/2012 1:48 PM FOG::MODDebug Username: BLACKOUT\Blackout
30/08/2012 1:48 PM FOG::MODDebug Hostname: BLACKOUT
30/08/2012 1:48 PM FOG::MODDebug Attempting to open connect to: http://10.0.0.23/fog/service/debug.php
30/08/2012 1:48 PM FOG::MODDebug Server responded with: Hello FOG Client
30/08/2012 1:48 PM FOG::MODDebug Module has finished work and will now exit.[/code]
I have also attached the latest version of MODDebug which outputs the above as soon as the service starts (it used to wait 100 seconds)
[url=“/_imported_xf_attachments/0/162_MODDebug.dll?:”]MODDebug.dll[/url][url=“/_imported_xf_attachments/0/163_AbstractFOGService.dll?:”]AbstractFOGService.dll[/url]