resadd -
Here is some code I use for set a call drive variable. I set a variable value within my login script batch file (login.bat, TmpKixVar) to '1'. In this way, my script can differentiate if called from the login batch file, or a command prompt for testing.

In this example, the call drive is the server netlogon share.

I use this so if changing directories to call KiX scripts from (primarily during testing), only 1 place in my script to change versus every CALL command.

This code is for KiX 3.63.

Bill

code:

Batch process to set variable:

SET TmpKixVar=1
%WinDir%\Kix32.exe %0\..\login.kix
SET TmpKixVar=
EXIT


KiX script to use variable and set CALL dir:

SELECT ; REM ** Variable set/removed from batch file 'login.bat'
CASE (%TmpKixVar% = 1) AND (@INWIN = 1) $CallDrv = (SUBSTR (@LDRIVE, 1, LEN (@LDRIVE)-1)) ; REM ** Removes trailing '\'.
CASE (%TmpKixVar% = 1) $CallDrv = @LDRIVE
CASE (1) $CallDrv = @CURDIR ; REM ** Script started from command prompt
ENDSELECT

; REM ** Set where all scripts are called from (REGULAR or TEST directories)
$CallKix = "$CallDrv\Regular"


Using CALL command within script:

CALL "$CallKix\kixscript.kix"


[ 25 January 2002: Message edited by: bleonard ]