Pech,

Let's start with some questions:

Starting from the top..
  • On your Domain Controller (DC), is it up-to-date with drivers, etc.? Have you been to windowsupdate, etc.?
  • What Service Pack is the DC?
  • Anything in the Eventlog related to this or KiXtart in general?
  • Is there space available on the DC if it is being used for other purposes like a file store?
  • Is the network DHCP or Static?
  • Can you PING the DC from the Command Line? By IP? By Name?
  • Has this ever worked properly?
  • User Profiles in Active Directory users and computers - do you specify PLOGON.BAT or PLOGON?
  • > One possible cause of this error is that License Manager has not been set up to grant enough connections to meet the clients' demands.
    Did you setup your license Manager by Client or by Server? If you set it by 25 Clients for example and the 26th logs in, sorry!!
  • Do your users have at least Read and Execute permissions on your NETLOGON folder/share?
You are right, there is no real difference in the environment variables and the KiXtart macros.
But, the macros are easy and quick to use. KiX Macros tend to be more accurate too.

However, the Macros are especially handy with Windows 9x.
If you want to use environment variables outside of Windows and in a DOS Session.
You will need to use:
WINSET.EXE
PUTINENV.EXE

The question being, if you can do this stuff in KiXtart, why use extra utilities?

Now, back on task here..

Using the information that you have told us.. The following has been compiled together.

This is using some ideas from -
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318689
There are some errors with Microsoft's code, but has good ideas.
  • SETLOCAL..ENDLOCAL don't work with 9x
  • CALL is used in Batch Scripting as well as KiX "CALL"s another Batch Script or KiX script.
PLOGON.BAT
code:
@ECHO off :: -- Note: the correction here
IF "%OS%" == "Windows_NT" goto NT_OS
%0\..\kix32.exe %0\..\PLogon9x.kix :: -- Note: the correction
GOTO END
:NT_OS
kix32.exe PLogonNT.kix :: -- Note: the correction and this should work in NT environments
:: %logonserver%\netlogon\kix32.exe %logonserver%\netlogon\PLogonNT.kix ;-- This is the first alternate way to do this
:: %windir%\kix32.exe %logonserver%\netlogon\PLogonNT.kix ;-- This is an alternate way to do this
GOTO END

:END
EXIT

Left out the 9x script as it appears to work ok..

Added in some more detection
PLogonNT.kix
code:
 ? "Map Network drive (User)..."
IF (GETFILEATTR("H:\") & 16) ; - Check for Drive existence first
USE H: /DELETE
If @ERROR <> '0'
?'ERROR DELETING H: DRIVE ' + @ERROR
ENDIF
USE H: "\\bstl_svr3\" + @userid + "$"
If @ERROR <> '0'
?'ERROR MAPPING H: DRIVE ' + @ERROR
ENDIF
ELSE
USE H: "\\bstl_svr3\" + @userid + "$"
If @ERROR <> '0'
?'ERROR MAPPING H: DRIVE ' + @ERROR
ENDIF
ENDIF

IF INGROUP("MK11")
IF (GETFILEATTR("I:\") & 16)
USE I: /DELETE
If @ERROR <> '0'
?'ERROR DELETING I: DRIVE ' + @ERROR
ENDIF
USE I: "\\bstl_svr3\DocMK11$"
If @ERROR <> '0'
?'ERROR MAPPING I: DRIVE ' + @ERROR
ENDIF
ELSE
USE I: "\\bstl_svr3\DocMK11$"
If @ERROR <> '0'
?'ERROR MAPPING I: DRIVE ' + @ERROR
ENDIF
ENDIF
IF (GETFILEATTR("J:\") & 16)
USE J: /DELETE
IF @ERROR <> '0'
?'ERROR DELETING J: DRIVE ' + @ERROR
ENDIF
USE J: "\\bstl_svr3\ShareDoc"
If @ERROR <> '0'
?'ERROR MAPPING J: DRIVE ' + @ERROR
ENDIF
ELSE
USE J: "\\bstl_svr3\ShareDoc"
If @ERROR <> '0'
?'ERROR MAPPING J: DRIVE ' + @ERROR
ENDIF
ENDIF
; -- If the next line is a windows program, RUN will work
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF
; Before continuing, copy the text from the window and paste
; the information in response here
?"PRESS ANY KEY TO LEAVE"
GET $K
EXIT

We could actually combine PLogon9x.kix and PLogonNT.kix into one script:
KiXtart.kix
code:
 ? "Map Network drive (User)..."
IF (GETFILEATTR("H:\") & 16)
USE H: /DELETE
USE H: "\\bstl_svr3\" + @userid + "$"
ELSE
USE H: "\\bstl_svr3\" + @userid + "$"
ENDIF

IF INGROUP("MK11_LOC") OR INGROUP("MK11")
IF (GETFILEATTR("I:\") & 16)
USE I: /DELETE
USE I: "\\bstl_svr3\DocMK11$"
ELSE
USE I: "\\bstl_svr3\DocMK11$"
ENDIF
IF (GETFILEATTR("J:\") & 16)
USE J: /DELETE
USE J: "\\bstl_svr3\ShareDoc"
ELSE
USE J: "\\bstl_svr3\ShareDoc"
ENDIF
; -- If the next line is a windows program, RUN will work
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF
EXIT

So, if we do that change.. PLogon.bat becomes the following:
PLOGON.BAT
code:
@ECHO off :: -- Note: the correction here
IF "%OS%" == "Windows_NT" goto NT_OS
%0\..\kix32.exe %0\..\Kixtart.kix
GOTO END
:NT_OS
kix32.exe Kixtart.kix
GOTO END

:END
EXIT

Time to go to bed..

Kent

[ 07. November 2002, 08:54: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's