Advertisement
marwanpro

script mac

Apr 21st, 2016
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.74 KB | None | 0 0
  1. @echo off
  2.  
  3. set mac="00AABB11CC"
  4.  
  5. C:
  6. cd ../../../../../..
  7. if not exist mac-modified if not exist mac-stock (goto :makefile)
  8. if exist mac-modified (goto :unhide) else (goto :hide)
  9.  
  10. :hide
  11. ren mac-stock mac-modified
  12. reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007 /v NetworkAddress /d %mac% /f
  13. goto :reboot
  14.  
  15. :unhide
  16. ren mac-modified mac-stock
  17. reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007 /v NetworkAddress /f
  18. goto :reboot
  19.  
  20.  
  21. :reboot
  22. netsh interface set interface "Local Area Connection" disable
  23. netsh interface set interface "Local Area Connection" enable
  24. goto :eof
  25.  
  26. :makefile
  27. mkdir mac-stock
  28. goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement