var oSession = WScript.CreateObject( "NiApi.SrvrSession", "oSession_" ) ;

WScript.Echo( "NiApi test script!" ) ;

function oSession_OnLogin( LoginResult )
{
	WScript.Echo( "OnLogin" ) ;
	return 0 ;
}

oSession.HostAddr = "nidemo.mfd.ru" ;
oSession.HostPort = 2900 ;
oSession.Name     = "yourloginhere" ;
oSession.Password = "yourpasswordhere" ;
oSession.Connect( ) ;

iCount = 0
while( iCount < 10 )
{
	WScript.Sleep( 500 ) ;
	++iCount ;
}

WScript.Echo( "Script terminated" ) ;