Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

there is this stupid hex value in ipconfig that i need to get in code somehow.

(no it's not an ip and no i'm not trying to take over the world)

 

what i'd like to do is run ipconfig in code somehow

and stream it's output into a variable so i can find this stupid hex thing and store it.

 

i'll be glad to give my legitimate reason for doing this if you have the time to listen. (pm me or something so i don't spam the board)

 

thanks

brandon

i'm not lazy i'm just resting before i get tired.
  • Administrators
Posted (edited)

You could use code similar to the suggestion in this thread to redirect the output from ipconfig.

you would then just need to search through the returned data for lines containing the term "physical address".

If you can't get it working post again and I'll see what I can do.

Out of interest have you considered using WMI to retrieve the MAC address rather than parsing the output of ipconfig /all, think I saw a recent post from dynamic_sysop about that....

Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

it's not the mac address it's some big long crazy hex number (like 25 digits) that is sort of the 'name' of the adapter ie the 'Ethernet Adapter LAN' line (or similiar)

 

thanks for the link i'll check it out

i'm not lazy i'm just resting before i get tired.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...