Les, Thanks for the input. I tried break on in the script, then terminated it using the End Task function. This however didn't force a logoff either. (Stupid Win9x)...

Bstyles' rundll.exe shell32.dll,SHExitWindowsEx 6
seems to do the trick however, on both Win98 and Win95. It reboots the computer. I'll have to do some testing on a couple of additional PC's, but I think this may be it; Thanks!

Should I still encounter a problem, I will use the errorlevel method. I do have a question about that though: How do I handle exit codes if the script that generates the exit code was called by another script?
Like:

code:

If $Logoff=1
Exit(4)
Else
Exit
Endif

Then returning to the 'mother-script' which should also exit if the exitcode is 4, and also should leave the exitcode intact for the batch file to process the Rundll command..? Would that be something like:

code:

Call "Authorised.kix"
; after the script returns, check for exitcode
If %1%="4"
Exit(4)
Endif

_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.