Hey guys I need to know how to change the MAC Address of my pc, I know that it has something to do with the registry and I dont like to dig into that to much, reason being, if something is messed up its messed up for good. I dont have any starter code to go on. Sorry.
Asked
Active
Viewed 1,166 times
2 Answers
0
see
netsh interface ipv4 set address /?
This should do what you want.
EDIT: I wrote this program some years ago. Use whatever you need from it. Note that you may have to adapt "LAN-Verbindung" to your adaptername (find it with 'ipconfig') Also sorry for the german "how-to", I don't know how those menues are named in english. - But maybe, you don't have needs for an DHCP-Server.
@echo off
if "%1"=="home" goto home
if "%1"=="office" goto office
if "%1"=="dhcp" goto dhcp
if "%1"=="server" goto server
goto help
REM set ip-address to parameter
netsh interface ip set address "LAN-Verbindung" static %1 255.255.255.0
goto ende
:dhcp rem work as DHCP-Client
netsh interface ip set address "LAN-Verbindung" dhcp
goto ende
:server rem work as DHCP-Server
netsh interface ip set address "LAN-Verbindung" static 192.168.0.1 255.255.255.0 192.168.0.1 1
goto ende
:home rem fixed Address at home
netsh interface ip set address "LAN-Verbindung" static 192.168.178.30 255.255.255.0 192.168.178.1 1
goto ende
:office rem fixed Address at office
netsh interface ip set address "LAN-Verbindung" static 192.168.0.5 255.255.255.0
goto ende
:help
echo.
echo Syntax: ip [parameter]
echo Parameter:
echo home set a fixed IP (predefined)
echo work set a fixed IP (predefined)
echo server set a fixed IP (predefined) and works as DHCP-Server
echo dhcp works as DHCP-Client
echo [IP-Adresse] set a fixed IP (defined by parameter
echo Examples:
echo ip 192.168.1.44 sets IP to 192.168.1.44
echo ip server sets IP to 192.168.0.1 and starts DHCP-Server
echo ip home sets IP to a fixed (predefined) IP
echo ip dhcp fetches an IP from DHCP-Server
echo ATTENTION: to work as DHCP-Server, the "Gemeinsame Nutzung der
echo Internetverbindung" aktiviert werden (has to be done only one time).
echo Netzwerkverbindungen "Eigenschaften"
echo LAN-Verbindung "Eigenschaften"
echo "Erweitert" "Anderen Benutzern im Netzwerk gestatten..." aktivieren
echo HINT: This Batch-file needs Administrator-rights
echo.
REM the IP-Range for den DHCP-Server can be determined to a smaller range.
REM Info see: http://support.microsoft.com/?kbid=230248
goto ende2
:ende
ipconfig
:ende2
echo.

Stephan
- 53,940
- 10
- 58
- 91
-
could you please explain this a bit im confused in the command syntax, theres nothing that allows me to change the MAC only gateway and static ips @Stephan – cmd May 31 '13 at 06:38
-
ah sorry, you meant the hardwareaddress of the nic. You know, that every NIC in the world has it's _unique_ adress, and you will get into trouble with connections, if it is _not_ unique? – Stephan May 31 '13 at 09:10
0
On my own PC, I have a Realtek PCIe card, and I can specify a hardware (MAC) address this way.
- On Windows 7, try going to Control Panel\Network and Internet\Network Connections.
- Select your network adapter and right-click to open the context menu
- Select Properties. A window pops up with the Networking tab.
- Click the Configure button beneath the name of your network adapter.
- Click the Advanced Tab.
- Select the Network Address property.
Here's a link to a Superuser.com thread with a screenshot: Advanced parameters for realtek pci-e gbe family network card
You can also research MAC Spoofing for further information.

Community
- 1
- 1

dliverpool
- 101
- 3