WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Logon Issues

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

More NT Logon Scripts Details

Keywords: 

Question:

There are various TechSupport documents that describe workarounds allowing a WinBatch exe to run as an NT logon script avoiding protections errors.

We've been successfully running a compiled exe as a logon script for out NT Clients for sometime. However, now we're trying to get the same script to run on '98 clients. Not surprisingly (and for the documented reasons) the script causes a protection error.

Now please excuse me for being thick, but...

a) If you use the 'batch file' method of starting the exe how do you determine which NetLogon share the exe should be run from. i.e. we have multiple domain controllers for each domain spread across many geographical locations and we don't want all the '98 clients to run the logon script over the WAN (and of course the %logonserver% environment variable doesn't exist under '98).

b) The other workaround is to create a small 'exe' that calls a wbt. The theory is that the exe should have time to execute before the NetLogon drive disappears. However, if I create and compile an exe with just a single comment ';' in it (and no other code) it still causes a protection error. (but if I run the same exe post logon, or as a logon script for an NT client it works as expected).

Answer:

Try running your compiled winbatch exe (abc.exe) from the BAT file as....
	START /w abc.exe
the /w switch causes the bat file to wait until the WinBatch script is complete.

Question (cont'd):

Thanks..... but this is only going to work if I add the path if the executable to the local system path, i.e. Z:\(?) We're running WinBatch version 98A 2.5abq with the compiled exe and dlls in the NetLogon dirs on the servers.

If we run the script from a batch file (using start /wait) it executes cleanly, but if we run the exe directly it causes a protection error.

Our NT clients run the exe directly (i.e. not through a batch file).

The user manager help file says that the logon script can be a batch file (bat or cmd) or an exe file. However, there is note that says computers running Client for MS-DOS, WFWG, NT3.51 or LAN Man 2 must use a bat file. But there's no mention of '9x so I guess it doesn't fall into this category.

Any ideas why even a small .exe causes a protection error (because this would be much tidier).

Answer:

Not quite sure how the START would change things.

In general the only way a script crashes like that is to have its network connection terminated before it is finished executing. I suspect whereever you have the script is getting its network connections re-assigned during the login process. Don't do dat.

What if you add PAUSE to the login bat file after you launch the script?

???? Are you trying to replace the logon BAT file with a compiled EXE. I'm not aware that that might be legal. I think the system wants the BAT file in there.

I've not seen a Windows EXE used in this context. I can imagine a DOS exe might work.


Article ID:   W13510
Filename:   More Login Script Details.txt
File Created: 1999:04:15:16:54:30
Last Updated: 1999:04:15:16:54:30