Re: Start serwisu - batch z pingiem

Autor: Marcin Hlibowski <roger7_at_poczta.onet.NO.SPAM.pl>
Data: Sun 21 Nov 2004 - 17:13:00 MET
Message-ID: <cnqem9$5nv$1@news.onet.pl>

"Radoslaw Krzyzan" <non@non.non> wrote in message
news:cnq6c9$35l$1@nemesis.news.tpi.pl...
> potrzebuję takiego batcha którego sobie wrzucę do schedulara co xx minut
> który będzie robił :
>
> echo off
> if ping www.onet.pl | find "time out" then
> net stop "Internet sharing"
> net start "Internet sharing"
>

coś takiego (piszę z palca):

ping www.onet.pl | find /I "time out" >nul
IF NOT errorlevel 1 (
    net stop "Internet sharing"
    net start "Internet sharing"
)

albo

ping www.onet.pl | find /I "time out" >nul && (
net stop "Internet sharing" & net start "Internet sharing")

To zadziała gdy dowolna z 4 standardowych odpowiedzi ping
da "time out" ale to juz sobie ustawisz.

Poza tym serwis "Internet sharing" chyba inaczej się nazywa :
"Internet Connection Firewall (ICF) / Internet Connection Sharing (ICS)"

-- 
Roger
Received on Sun Nov 21 17:15:24 2004

To archiwum zostało wygenerowane przez hypermail 2.1.8 : Sun 21 Nov 2004 - 17:42:04 MET