My Bat File works perfect, but after i compile it to a exe File, my Script wont run anymore.
After start the Exe File i see very Short the Dos Window and than its gone.
Here is my Bat Code
Code: Select all
@echo off
COLOR 0C
if exist c:\Windows\System32\Drivers\Etc\hosts goto ok
echo Datei nicht gefunden!
goto END
:ok
echo --- Seitensperre fuer Matthias. --
echo.
echo.
echo.
attrib -r c:\Windows\System32\Drivers\Etc\hosts
Set /P Sperre=Gib die Seite zum Sperren an!
echo 127.0.0.1 %Sperre% >> c:\Windows\System32\Drivers\Etc\hosts
attrib +r c:\Windows\System32\Drivers\Etc\hosts
:END
Sorry for my bad english.