@echo off
rem $Id: StarWind_Install.cmd,v 1.2 2005/01/16 23:21:11 valery Exp $

setlocal
echo StarWind: Installing and starting the iSCSI server...
echo.

echo Check if TCP/IP stack is installed...
bartpe.exe -c c -q ms_tcpip
if not "%errorlevel%" == "0" (
	echo.
	echo TCP/IP stack is not installed!
	echo Please load network support before this script!
	goto _err)

echo.

set tmpdir=%temp%\StarWind
mkdir %tmpdir%
              
%systemdrive%
cd \Programs\RDS\StarWind

rem copy StarWind.conf %tmpdir%\
rem StarWindService.exe --install -o -ld%tmpdir%\ -c%tmpdir%\StarWind.conf

StarWindService.exe --install -o -ld%tmpdir%\

StarWindService.exe --start

goto _end

:_err
echo.
rem set errorlevel to 1 by (mis)using color
color 00 
:_end
endlocal
