Exe wont work

Convert your BATch files into EXEcutable format in one click.
Post Reply
Battlemage
Posts: 1
Joined: Tue Jul 21, 2009 4:46 pm

Exe wont work

Post by Battlemage » Tue Jul 21, 2009 4:50 pm

Hello i use the Version 3.2.1.0
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

With this bat(exe) i will add short an manualy Adresses to the hosts file to stop browsing them.

Sorry for my bad english.

Post Reply