• Home
  • Regtweaker
  • Subscribe to Posts
  • Subscribe to comments

PC solutions

Give you Professional Suggestions

  • Home
  • News
  • Registry
  • Script
  • System Utility
  • Virus
  • Windows
  • XML
Home Script How to get client MAC address

How to get client MAC address

Posted on Saturday, 1 May 2010
803 Comments
Share|

solutions 1:

ManagementScope theScope = new ManagementScope("\\\\computerName\\root\\cimv2");

StringBuilder theQueryBuilder = new StringBuilder();
theQueryBuilder.Append("SELECT MACAddress FROM Win32_NetworkAdapter");
ObjectQuery theQuery = new ObjectQuery(theQueryBuilder.ToString());
ManagementObjectSearcher theSearcher = new ManagementObjectSearcher(theScope, theQuery);
ManagementObjectCollection theCollectionOfResults = theSearcher.Get();

foreach (ManagementObject theCurrentObject in theCollectionOfResults)
{
string macAdd = "MAC Address: " + theCurrentObject["MACAddress"].ToString();
MessageBox.Show(macAdd);
}

solutions 2:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Getting MAC Address From Javascript(IE Only)</title>
 
<script language="javascript">
function showMacAddress(){
 
	var obj = new ActiveXObject("WbemScripting.SWbemLocator");
	var s = obj.ConnectServer(".");
	var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
	var e = new Enumerator (properties);

 
	var output;
	output='<table border="0" cellPadding="5px" cellSpacing="1px" bgColor="#CCCCCC">';
	output=output + '<tr bgColor="#EAEAEA"><td>Caption</td><td>MACAddress</td></tr>';
	while(!e.atEnd())

	{
		e.moveNext();
		var p = e.item ();
		if(!p) continue;
		output=output + '<tr bgColor="#FFFFFF">';
		output=output + '<td>' + p.Caption; + '</td>';
		output=output + '<td>' + p.MACAddress + '</td>';
		output=output + '</tr>';
	}

	output=output + '</table>';
	document.getElementById("box").innerHTML=output;
}
</script>
 
</head>
<body>
	<input type="button" value="Show MAC Address" onclick="showMacAddress()" />

	<div id="box">
	</div>
</body>
</html>

solutions 3:

Advanced JavaScript with Internet Explorer: 

Retrieving Networking Configuration Information - How to retrieve MAC address and other extended network information using JavaScript

Now, let us try to extend the previous sample by showing further information about the network adapters.  The entire code for the sample is as follows: 

<!DOCTYPE  HTML  PUBLIC  "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
      <head>
            <title></title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="vs_targetSchema" content="http://schemas.
microsoft.com/intellisense/ie5">
            <script id="clientEventHandlersJS" language="javascript">
<!--

function Button1_onclick() {
      var locator = new ActiveXObject
"WbemScripting.SWbemLocator");
      var service = locator.ConnectServer(".");
      var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
      var e = new Enumerator (properties);
      document.write("<table border=1>");
      dispHeading();
      for (;!e.atEnd();e.moveNext ())
      {
            var p = e.item ();
            document.write("<tr>");
            document.write("<td>" + p.Caption + "</td>");
            document.write("<td>" + p.IPFilterSecurityEnabled + "</td>");
            document.write("<td>" + p.IPPortSecurityEnabled + "</td>");
            document.write("<td>" + p.IPXAddress + "</td>");
            document.write("<td>" + p.IPXEnabled + "</td>");
            document.write("<td>" + p.IPXNetworkNumber + "</td>");
            document.write("<td>" + p.MACAddress + "</td>");
            document.write("<td>" + p.WINSPrimaryServer + "</td>");
            document.write("<td>" + p.WINSSecondaryServer + "</td>");
            document.write("</tr>");
      }
      document.write("</table>");
}

function dispHeading()
{
      document.write("<thead>");
      document.write("<td>Caption</td>");
      document.write("<td>IPFilterSecurityEnabled</td>");
        document.write("<td>IPPortSecurityEnabled</td>");
        document.write("<td>IPXAddress</td>");
      document.write("<td>IPXEnabled</td>");
      document.write("<td>IPXNetworkNumber</td>");
      document.write("<td>MACAddress</td>");
      document.write("<td>WINSPrimaryServer</td>");
      document.write("<td>WINSSecondaryServer</td>");
      document.write("</thead>");
}

//-->
            </script>
      </head>
      <body>
            <INPUT id="Button1" type="button" value="Button" 
name="Button1" language="javascript" onclick="return Button1_onclick()">
      </body>
</html>

The explanation for the above code is very similar to that of the previous section. The only difference is that I added few more properties to get in-depth network configuration information.

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl
Tagged with: MAC

803 Responses to “How to get client MAC address”

Trackbacks are disabled.

Woollen Blanket
Gareth
cause marketing services
penny stock picks
internal doors
Amanpulo
get marijuana green card washington
bikram yoga
manhood massage
thunderbolt phone
siker
Land O Lakes Carpet Cleaners
Irrigation Drip System
kohler pedestal sink
Track Internet Usage
narrowboat insurance
Desiree
adjustable dumbbells
duoderm cgf
Gazebo Birdfeeder
Keyword 2: Lethal Commission Reviews
Panasonic SD
Transparent film
Eureka Envirosteamer
Caralluma Actives
VISA Prepaid
surveyspaid review
resume help
muse
Occult
men made easy review
Orbital Shaker
Milton Keynes Plumber
hiring a lawyer
Sprinkler System Fairfax VA
best penny auction sites
scottsdale acupuncture
mont blanc qing dynasty
866-826-4101
Wicker Sunroom Furniture
Evil eye bracelets
Locksmith Service Chicago
knife and cake server set
Watch Puss In Boots Online
Watch The Rum Diary Full Movie
Maple Leaf Coin
tea kettle
Watch 11-11-11 Full Movie
Watch 11-11-11 Full Movie
odds betting
Signs of Diabetes
Drake Institute
half cent coin
half cent coin
stunning clutch bags
LED Floodlight
Software Courses Online
gear checklist
Gaming Laptops Under 1000
classic coins
uncirculated graded dollars
large cent coin
Buy Guaranteed Facebook Fans
x men videos
exercises to tone the stomach
DUI Santa Maria
Sizzling Hot
sushi in boston ma
contact paper
laptop cover
University
sovereign gold coin
chat roulette
Presidential Coin
mlm training
uncirculated graded dollars
satchel
Seated Liberty Coin
gold mexican coin
Aviation Airlines
Ironmaxx Protein
piles treatment
SEO Agentur
Humor
Wicked Spice
Payment Processing Company
Toys R Us Coupons Toys R Us Coupons
Mr Nice Guy
earn money from home
Netherlands Servers
Elkton Florist
national tire and battery locations
restore israel
business card maker
celebrity fitness malaysia
Watch A Very Harold and Kumar Christmas
Watch A Very Harold and Kumar Christmas
spybubble
baby center community
panasonic sd-yd250
Watch The Rum Diary Online
lo subliminal
sears tires coupon
plummers furniture outlet
Lacoste Prep CB
computer repair atlanta
Linda
modeling agencies
dyson ball
DUI Attorney Tucson
best steam cleaner
cheap hotels
inversion machine
Homepage
zoloft lawsuit texas
Vin Dicarlo Scam
african mango plus
Seyego
Watch A Very Harold and Kumar Christmas
Watch The Rum Diary Online
tom ford
scar remedies
workout timer
Download chart music
guldlänkar
Richard Vermut
where to buy phen375
fuktighetskräm efter finnar
Hemp
trane heat pumps
Cool Shoes
snabbaste tåget i världen
breville bov800xl toaster oven
party jumpers
köpa ädelmetaller
roomba
Eco Friendly
Family Law Lawyer
JanSport Right Pack
Chat
Indica
passed
How do i get a tax return
website traffic
batumi hotels
edmonton airport hotels
Vitiligo
Flamingo Hotel Penang
BTA
iphone 4s
internetsida
aperion speakers
whose number is this
porno gratis
stresstest
Target Promotional Codes
Handel mit Devisen
get public records
fabtech lift kits
sacramento personal injury attorney
Mobile Marketing
Gift Tags
removing window tint
Cpanel Hosting
auto traffic buddy
unlock blackberry
Dell WINBOOK N4 Battery
kitchen remodeling san diego
precious metal etf
How to get rid of blackheads
supplement kingdom
Carpet Cleaner Pembroke
How to get rid of blackheads
early signs pregnancy
best dsl modem
womens bathing suits
gafas de sol 2012
access hollywood live
Free Streaming Music Videos
Ottawa Farms
fat burning zone program
transmission fluid change cost
ohio travel bag
The Simple Golf Swing Review
Car Locksmith
Kids Eat Free Wednesday
Cooking Flash Games
nintendo 3ds
hidden cameras
Womens Lacoste Shoes New
T-Mobile
Feet Tube
cover letters
christian flatshare
option education
build your own laptop
inov8 shoes
coolest guy in the makati
brilliant tutorials
Schlafstörungen
best pension deals
hoover electric broom
Corrina Melendez
logitech mx 518
Accounting Basics
shure e2c earphones
best noise canceling headsets
Pioneer SE-DIR800C
Replica Rolex Swiss
customize shoes
usb to mini usb cable
The North Face
seo minneapolis
wind farm insurance
coy wheels
relik bf3 game guide
dock boards
ryka shoes
Rug Cleaning Queens NY
screenshot host
shell necklaces
floor mats for trucks
survivalism
Spy Camera
Bed bug feces
Cool Story Bro Tell It Again Sweatshirt
auto appraisal
Hiking and Camping
medical billing software
poultry housing
Open24 login
apply no contact to get your ex back
1500 Calorie Food
Art Gallery
ip camera
cheap diamond engagement rings
Hotels for All
rehab doctor
microsoft access class
Hjemmeside Design
Jual Beli Online
Statesville Ice Cream
Financial Business News Blog
san blas islands panama
Accounting Basics
Statesville Ice Cream
Watch 11-11-11 Online
Statesville Ice Cream
Accounting Basics
Asian Tiger Mosquito
Twilight Breaking Dawn Part 2
Conservatorship San Jose
free boat classifieds
free sim cards
the empower network
Twilight Breaking Dawn FULL MOVIE
Twilight Breaking Dawn FULL MOVIE
p90x transformation
T-Shirt Druck
Transparent Film
Bike Shops
grease monkey coupons
Biking
Twilight Breaking Dawn FULL MOVIE
Twilight Breaking Dawn FULL MOVIE
apparel
hotels in cape cod
Twilight Breaking Dawn Part 2
Backcountry
TechCracks
Twilight Breaking Dawn Part 2
chicken recipes for dinner
riflescopes
hoc ke toan
Sporting Goods
watch Domination online
Twilight Breaking Dawn FULL MOVIE
Skiing
Auto Glass Colorado Springs
garbage disposal repair
Twilight Breaking Dawn FULL MOVIE
Twilight Breaking Dawn Part 2
investment property in melbourne
jwoww tanning lotion
Adventures
dress up games
easy wood projects to make for kids
Accounting Basics
orthodontics lakeville
water conservation tip
film television comedy
regering
products to sell on ebay
Twilight Breaking Dawn FULL MOVIE
buy deca durabolin
Ripstik Caster Board
Barter Exchange
OnkelSeosErbe SEO Contest
new home builders
Wireless Printers Reviews
electric cigarette review
new home builders
Web design company spring Houston
adjustable dumbbell sets
other sites like fiverr
http:/www.givovafranchising.com
get rid of man boobs
gynexin
Predictive Maintenance
betainvites.com
Burberry Check
OnkelSeosErbe SEO Contest
vinegar uses
Elektrische Zahnbuerste
top rated workout supplements
Karaoke Equipments
traditional bows
acting headshots
how to train outside the gym
route 66 extended auto warranty complaints
Asian Tiger Mosquito
Asian Tiger Mosquito
Asian Tiger Mosquito
Asian Tiger Mosquito
canister vacuum reviews
buy video games
Asian Tiger Mosquito
Games
Asian Tiger Mosquito
Asian Tiger Mosquito
brainwave meditation
Blinds
property solicitors edinburgh
what is a massive heart attack
kindle touch 3g review
czekoladowe fontanny
Accounting Basics
Accounting Basics
Dragon plush
Recaro Child Seats
estate agents edinburgh
Garmin 305
TI-84 calculator
Solicitors Glasgow
Victoria secret coupons
facebook top games
kindle 3g review
fontanny czekoladowe
neil asher
Solicitors Edinburgh
unertl scopes
gucci solbriller
discount coupons brisbane
BDSM
auto insurance company savings
bag borrow steal
Folia stretch
Accounting Basics
  • wp timeline plugin says:
    2012-04-19 at 4:36 pm

    Excellent blog here! Additionally your web site a lot up fast! What web host are you the use of? Can I am getting your affiliate hyperlink in your host? I wish my web site loaded up as quickly as yours lol

  • why cant I get pregnant says:
    2012-02-29 at 6:51 am

    naturally like your web-site but you need to take a look at the spelling on several of your posts. Several of them are rife with spelling problems and I find it very troublesome to inform the truth nevertheless I will definitely come back again.

  • Empires and Allies guide says:
    2012-02-29 at 6:46 am

    Its such as you learn my mind! You appear to understand a lot approximately this, such as you wrote the ebook in it or something. I believe that you just could do with a few p.c. to drive the message home a bit, however other than that, this is great blog. A fantastic read. I’ll certainly be back.

  • Fast Cash Commission Guy says:
    2011-10-28 at 8:18 am

    Really insightful article, I was glad to locate your webblog using the web. I set a hyperlink on my personal site for that reason my followers will probably reach your blog. Don’t hesitate to consider a glimpse.

  • Kiteboarding Boracay says:
    2011-10-25 at 3:05 pm

    Kitesurf Tips…

    [...]here are some links to websites that we link to because we think they are worth visiting[...]…

  • Holiday Fiji Package says:
    2011-10-24 at 8:50 pm

    Close to being spot on…

    Right on the mark, well done….

  • Loch Lomond Log Cabins says:
    2011-10-24 at 5:45 pm

    Enjoyable Reading…

    We’re really liking this!…

  • Usa IFRS says:
    2011-10-24 at 1:21 am

    Consider some changes…

    Perhaps you could employ playing devil’s advocate upon occasion….

  • jailbreak says:
    2011-10-23 at 10:36 pm

    Websites worth visiting…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

  • Acoustic Electric Guitar says:
    2011-10-23 at 5:12 pm

    Fender Guitars…

    After research a few of the blog posts on your web site now, and I really like your means of running a blog. I bookmarked it to my bookmark web site list and will be checking back soon. Pls check out my internet website as well and allow me to understa…

  • WoW Gold says:
    2011-10-23 at 4:01 pm

    WoW Gold…

    [...]Here is a superb Weblog You may Uncover Exciting that we Encourage You[...]…

  • thermal night says:
    2011-10-22 at 8:16 pm

    Related……

    [...]just beneath, are numerous totally not related sites to ours, however, they are surely worth going over[...]……

  • ballet leotards says:
    2011-10-22 at 5:21 am

    Blogs ou should be reading…

    [...]Here is a Great Blog You Might Find Interesting that we Encourage You[...]……

  • warren tire says:
    2011-10-22 at 4:37 am

    Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  • Best Seller says:
    2011-10-21 at 11:27 pm

    Best Seller…

    Great line up. We will be linking to this great article on our site. Keep up the good writing….

  • HL5420F-D3 says:
    2011-10-21 at 11:20 pm

    FoxTec Online Computer Parts…

    [...]while the sites we suggest below are completely unrelated to ours, we think they are worth a look, so check them out[...]…

  • free backlinks says:
    2011-10-21 at 10:55 pm

    Free Backlinks…

    I really appreciate this post. I’ve been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thanks again…

  • Paintball Guns says:
    2011-10-21 at 10:30 pm

    Airsoft Guns…

    I couldn’t resist commenting…

  • kidney infection says:
    2011-10-21 at 9:58 pm

    Nature Herbal World…

    Nice post. I was checking continuously this blog and I’m impressed! Very useful information specially the last part :) I care for such information a lot. I was seeking this particular info for a long time. Thank you and best of luck….

  • search engine submission google says:
    2011-10-21 at 9:49 pm

    SEO Company and Web Design…

    [...]Cool web sites we visit[...]…

  • best extended car warranty comparison 2 says:
    2011-10-21 at 7:52 pm

    Automotive News and Reviews…

    [...]just below, are some interesting sites[...]…

  • contemporary furniture says:
    2011-10-21 at 5:13 am

    Check this out…

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

  • Best Year: The Year I Homeschooled My Child! says:
    2011-10-21 at 5:07 am

    Awesome website…

    [...]the time to read or visit the content or sites we have linked to below the[...]……

  • lights of america bulbs says:
    2011-10-21 at 4:44 am

    Websites worth visiting…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

  • classic r&b music says:
    2011-10-20 at 10:22 pm

    Links…

    [...]Sites of interest we have a link to[...]……

  • landscaping says:
    2011-10-20 at 8:11 pm

    Check this out…

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

  • Tarot says:
    2011-10-20 at 5:56 pm

    Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  • how to cure tinnitus says:
    2011-10-20 at 2:35 pm

    Related……

    [...]just beneath, are numerous totally not related sites to ours, however, they are surely worth going over[...]……

  • austin air conditioning contractor says:
    2011-10-20 at 2:14 pm

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  • unlocking iphone 5 says:
    2011-10-20 at 1:19 pm

    Websites you should visit…

    [...]below you’ll find the link to some sites that we think you should visit[...]……

  • locksmith in Berwyn IL says:
    2011-10-20 at 11:20 am

    Awesome website…

    [...]the time to read or visit the content or sites we have linked to below the[...]……

  • MLM says:
    2011-10-20 at 9:20 am

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  • car battery reviews says:
    2011-10-20 at 7:50 am

    Sources…

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]……

  • Hair Salon Advertising says:
    2011-10-20 at 5:21 am

    Cool sites…

    [...]we came across a cool site that you might enjoy. Take a look if you want[...]……

  • spine surgeons says:
    2011-10-20 at 5:09 am

    Links…

    [...]Sites of interest we have a link to[...]……

  • spy cameras says:
    2011-10-19 at 10:46 pm

    Blogs ou should be reading…

    [...]Here is a Great Blog You Might Find Interesting that we Encourage You[...]……

  • golf swing training says:
    2011-10-19 at 10:28 pm

    Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  • screen print t shirts says:
    2011-10-19 at 7:44 pm

    Blogs ou should be reading…

    [...]Here is a Great Blog You Might Find Interesting that we Encourage You[...]……

  • thefamilyinternational says:
    2011-10-19 at 3:11 pm

    Sites we Like……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

  • high school fundraising says:
    2011-10-19 at 2:26 pm

    Sources…

    [...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]……

  • community fundraising says:
    2011-10-19 at 1:54 pm

    Awesome website…

    [...]the time to read or visit the content or sites we have linked to below the[...]……

  • Anna Kournikova nude says:
    2011-10-19 at 11:45 am

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  • Wine DVD says:
    2011-10-19 at 5:05 am

    Recent Blogroll Additions……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

  • Wedding Photography Buxted Park says:
    2011-10-18 at 10:38 pm

    Websites you should visit…

    [...]below you’ll find the link to some sites that we think you should visit[...]……

  • asics shoes nimbus says:
    2011-10-18 at 9:40 pm

    Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  • « Previous 1 ... 7 8 9

    Leave a Reply:

    Click here to cancel reply.

    Name (required):
    Mail (will not be published) (required):
    Website:
    Comment (required):
    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
    验证图片
    刷新验证码
    *

    Popular Articles

      • How to uninstall pc optimizer pro, pc optimizer pro removal 1139 comment(s)
      • what is Pbupdate.exe and how to fix Pbupdate.exe error? 1138 comment(s)

    latest comments

    • 正在加载...

    Tags

      Antivirus Suite Autorun ave.exe Backdoor Backdoor.Win32 Backdoor.Win32 removal browser home page was altered cc Clicker.dj Clunky Backdoor removal Default home page is modified DLL files error DOMDocument->load() downloader encountered Fix Kernel32 Dll Error MAC Microsoft Security Essentials PSW PSW.Kykymber.cc registry was modified remove MyWinLocker remove regedit32.exe remove safedrv.exe remove Trojan.Win32.Buzus.a Run command slow computer Speed Up Computer speed up pc Trojan Trojan-Downloader.Win32.Small.b removal Trojan-PSW.Win32 Trojan.Win32 Trojan.Win32 removal Trojan Downloader Trojan Dropper uninstall MyWinLocker variant dj Virus W32.Cervivec.A@mm Win32 Win32.Hack.GrayBird.al.761856 Win32.TrojDownloader.Guupk.ps Worm Worm.Win32

    Category

    • News
    • Others
    • Registry
    • Script
    • System Utility
    • Virus
    • Windows
    • XML

    Archives

    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011

    Links

    • Download Drivers

    Pages

    • Regtweaker
    • Spyware Cease
    
    Copyright © 2012 PC solutions. Powered by VersionHunter.com. registry repair |Threats Center
    Top