You have a couple choices.

You should be calling BLAT from within the script using the SHELL command.

1) build your message as a variable inside the script and incorporate the variable $DN or
2) similar...Read the message text file and add the $DN var.

Both above require you to build a message as a variable.

I do not use Blat so I don't know if you can just pass it text for the message or if you need to specify a file.

then issue your SHELL comment to send the email

If you can specify a text string:
SHELL '%0\..\blat.exe $myText -t joseph.wilson@pharma.com -s "Computer in the Computers OU (PC:%1 User:%2)" -f LoginScript@pharma.com'

Else you will have to use Open and WriteLine to create a temp file for Blat before the shell.

$rc=Open(1, "c:\%temp%\@wrksta.txt", 5)
$rc=Writeline (1, $messageText)
$rc=Close (1)

Then SHELL '%0\..\blat.exe c:\%temp%\@wrksta.txt -t joseph.wilson@pharma.com -s "Computer in the Computers OU (PC:@wrksta User:@userid)" -f LoginScript@pharma.com'
Del "c:\%temp%\@wrksta.txt "

note: This is example and has not been tested or even proofed for proper syntax. Check your manual for exact usage.

[ 17 June 2002, 20:31: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/