Quem poderia me ajuda em uma bat que inserice novo conteúdo no arquivo host, digamos o conteúdo original.
Quem poder me ajudar desde ja muito grato!
Quem poder me ajudar desde ja muito grato!
Você não está conectado. Conecte-se ou registre-se
@echo off
attrib -r -s -h "%WinDir%\System32\drivers\etc\hosts"
if exist "%WinDir%\System32\drivers\etc\hosts" (
del /f /q "%WinDir%\System32\drivers\etc\hosts">nul
)
(
echo # Copyright ^(c^) 1993-1999 Microsoft Corp.
echo #
echo # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
echo #
echo # This file contains the mappings of IP addresses to host names. Each
echo # entry should be kept on an individual line. The IP address should
echo # be placed in the first column followed by the corresponding host name.
echo # The IP address and the host name should be separated by at least one
echo # space.
echo #
echo # Additionally, comments ^(such as these^) may be inserted on individual
echo # lines or following the machine name denoted by a '#' symbol.
echo #
echo # For example:
echo #
echo # 102.54.94.97 rhino.acme.com # source server
echo # 38.25.63.10 x.acme.com # x client host
echo.
echo #BLOCK Genuine Advantage
echo 127.0.0.1 mpa.one.microsoft.com
echo 127.0.0.1 localhost
echo.
)>>"%WinDir%\System32\drivers\etc\hosts"
attrib +r "%WinDir%\System32\drivers\etc\hosts"
Batch-Satti » FORUNS E CATEGORIAS » Fórum Geral » Ajuda!!! em Bat para deletar conteudo de um arquivo
Tópicos semelhantes
Permissões neste sub-fórum
Não podes responder a tópicos