Glaanieboy
OSNN Veteran Addict
- Joined
- 6 Mar 2002
- Messages
- 2,628
I've got an annoying problem with a batch script. It must first connect to my ISP, and then I starts up Winamp, which automatically connects to Wolf FM (an online radio station). I have set it up like this:
---------------------------------------------------------------------
@echo off
title Connecting Wanadoo and Wolf FM
rasdial "(name of ISP with quotes)" username password
if errorlevel 1 goto uhoh
if not errorlevel 1 goto WolfFM
:uhoh
echo There is an error with the ISP,
echo try again later.
echo Now press any key continue working with Windows
pause >nul
exit
:WolfFM
echo Connected!
echo now connecting Wolf FM (Winamp)
C:\progra~1\winamp\winamp.exe D:\music\wolffm.m3u
echo Connected succesfully to Wolf FM! Enjoy!
exit
---------------------------------------------------------------------
With that final exit is a problem. It only exits when I exit Winamp.
Can I set it up so that the script automatically exits, even when Winamp is still running?
ps. I have heard of Windows Scripting Host. Can I use this? And how?
---------------------------------------------------------------------
@echo off
title Connecting Wanadoo and Wolf FM
rasdial "(name of ISP with quotes)" username password
if errorlevel 1 goto uhoh
if not errorlevel 1 goto WolfFM
:uhoh
echo There is an error with the ISP,
echo try again later.
echo Now press any key continue working with Windows
pause >nul
exit
:WolfFM
echo Connected!
echo now connecting Wolf FM (Winamp)
C:\progra~1\winamp\winamp.exe D:\music\wolffm.m3u
echo Connected succesfully to Wolf FM! Enjoy!
exit
---------------------------------------------------------------------
With that final exit is a problem. It only exits when I exit Winamp.
Can I set it up so that the script automatically exits, even when Winamp is still running?
ps. I have heard of Windows Scripting Host. Can I use this? And how?