PDA

View Full Version : Help with method



AaronCooper
02-02-2004, 10:11 PM
I have a project that needs to reference a file (i.e. File.txt or File.ini)
Which can store many table items?

Example:
00-00-00-00-00-00, Home, HomeIP, Home Email
11-11-11-11-11-11, Test, TestIP, Test Email
22-22-22-22-22-22, Test2, Test2IP, Test2 Email

I need to look up the table using the first set (MAC address) so the project can then use the other information to set Computer name, IP, and email address.

I have a method to do the setting of those, but I am a little lost on how to reference the file. Should I use a INI file?

I was going to use a ipconfig /all > IP.txt and read that file to find the MAC address and the use it to lookup the and set the correct information for that machine.

I know I could do this using a hard code of each MAC, In a IF Then statement BUT a TEXT or INI I could edit , rather than adding or changing the code would be best.

Worm
02-03-2004, 07:37 AM
Instead of using IPCONFIG, look into the System.GetLanInfo action.

result=System.GetLanInfo();
Dialog.Message("MAC Address", result.NIC);

AaronCooper
02-03-2004, 09:40 AM
I love Autoplay.... I need a week to sit down and look at each action and see what it does.

Thanks this makes finding that info easier.

Now any ideas on how to reference the file with the data.
So I can use the data to finish configuring the Computer.

I am trying to build a project/app that will automate these changes for use with a ghost image stored on a bootable DVD, that other people in our staff can use, whom do not have high computer skills.
The idea is to put the DVD in, it will ghost the machine and afterwards automatically changes it's Computer name, e-mail info, DHCP or Static IP info based on the MAC address.


Originally posted by Worm
Instead of using IPCONFIG, look into the System.GetLanInfo action.

result=System.GetLanInfo();
Dialog.Message("MAC Address", result.NIC);

Worm
02-03-2004, 11:42 AM
Sounds like the perfect candidate for the SQLite Plugin to me. I'm sure you could use the TextFile.ReadToTable, and then break out the lines yourself though.