logon script who runs twice

K

Kevin

Hi,

I'm currently having some big trouble with the logon script
(netlogon) who run's twice on several Xp computers (but not all). No
problem with NT4 workstations.
logon scripts are declared for each user in the usermanager (ad thing
or what)
Domain controller is a W2003 Enterprise with PDC emulation. Since a lot
of NT4 workstation are still connecting to our domain, we do not use
any GPO (no loopback thing thus!!)
My station used to have this issue, but since several days it's all
gone (same thing with others coworkers), and I just can't understand
why!
This is pretty bad, because it generates error messages, and take a
long time trying to map every network drive, and printer twice...

Best regards,

Kevin DEHLINGER

(sorry for my bad english :/ )
 
P

Pegasus

Kevin said:
Hi,

I'm currently having some big trouble with the logon script
(netlogon) who run's twice on several Xp computers (but not all). No
problem with NT4 workstations.
logon scripts are declared for each user in the usermanager (ad thing
or what)
Domain controller is a W2003 Enterprise with PDC emulation. Since a lot
of NT4 workstation are still connecting to our domain, we do not use
any GPO (no loopback thing thus!!)
My station used to have this issue, but since several days it's all
gone (same thing with others coworkers), and I just can't understand
why!
This is pretty bad, because it generates error messages, and take a
long time trying to map every network drive, and printer twice...

Best regards,

Kevin DEHLINGER

(sorry for my bad english :/ )

You might be invoking your logon script from two different
places, e.g. via
- AD policy
- The netlogon share
- The startup folder on the user's PC

If you insert the following lines at the beginning of your logon
script then you might be able to see where it resides:

@echo off
echo Script name=%0
pause
 
K

Kevin

Pegasus a écrit :
You might be invoking your logon script from two different
places, e.g. via
- AD policy

No ad policy
- The netlogon share
??

- The startup folder on the user's PC
Nothing too
If you insert the following lines at the beginning of your logon
script then you might be able to see where it resides:

@echo off
echo Script name=%0
pause

Same place twice (ie \\PDC\netlogon\logonscript.bat)

It looks like thats something to do with the computer and not with
users profile...
I've tried the userenv.log debug but there's nothing helpfull.
 
P

Pegasus

Pegasus a écrit :
You might be invoking your logon script from two different
places, e.g. via
- AD policy

No ad policy
- The netlogon share
??

- The startup folder on the user's PC
Nothing too
If you insert the following lines at the beginning of your logon
script then you might be able to see where it resides:

@echo off
echo Script name=%0
pause

Same place twice (ie \\PDC\netlogon\logonscript.bat)

It looks like thats something to do with the computer and not with
users profile...
I've tried the userenv.log debug but there's nothing helpfull.
 
K

Kevin

Pegasus a écrit :
Let's have a look at your logon script!


Yep:

\\SDC1P571\repl$\scripts\pwusr\version.exe
if ERRORLEVEL 5 GOTO WXP
GOTO SUITE
:WXP
wscript.exe \\SDC1P571\repl$\scripts\pwusr\pwusr.vbe
:SUITE


if "%TSE%"=="1" goto TSE
Rem #not TSE#
pccafini.exe
con2prt /f
call logonuti.exe \\%SRVTELEDIS%\INFOR\FICUTI
cmd /c %systemRoot%\Regedit.exe /S proxy.reg
cmd /c %systemRoot%\Regedit.exe /S cafmetz_2.reg
goto FIN

: TSE
call \\SVBU1571\INFOR\FICUTITSE\logonuti.exe \\SVBU1571\INFOR\FICUTITSE
goto FIN


: FIN
echo.
 
P

Pegasus

Pegasus a écrit :
Let's have a look at your logon script!


Yep:

\\SDC1P571\repl$\scripts\pwusr\version.exe
if ERRORLEVEL 5 GOTO WXP
GOTO SUITE
:WXP
wscript.exe \\SDC1P571\repl$\scripts\pwusr\pwusr.vbe
:SUITE


if "%TSE%"=="1" goto TSE
Rem #not TSE#
pccafini.exe
con2prt /f
call logonuti.exe \\%SRVTELEDIS%\INFOR\FICUTI
cmd /c %systemRoot%\Regedit.exe /S proxy.reg
cmd /c %systemRoot%\Regedit.exe /S cafmetz_2.reg
goto FIN

: TSE
call \\SVBU1571\INFOR\FICUTITSE\logonuti.exe \\SVBU1571\INFOR\FICUTITSE
goto FIN


: FIN
echo.
===========================

There is nothing visible in your logon script that would
explain a double invocation. On the other had I wonder
if some of the external program you call might not
shell out and call your batch file a second time. To
eliminate this possibility I would disable every call
to an external executable, check if the problem still
occurs, then re-enable them one by one.

A worrying aspect is the absence of full path
definitions in your batch file. The following files
are not Windows system files, yet you do not
provide an explicit path to their location. How
can you be sure that they are found in the correct
location? "con2prt", for example, could be a batch
file on some machines!
- pccafini.exe
- con2prt /f
- logonuti.exe
- proxy.reg
- cafmetz_2.reg
 
K

Kevin

Pegasus a écrit :
There is nothing visible in your logon script that would
explain a double invocation. On the other had I wonder
if some of the external program you call might not
shell out and call your batch file a second time. To
eliminate this possibility I would disable every call
to an external executable, check if the problem still
occurs, then re-enable them one by one.
A worrying aspect is the absence of full path
definitions in your batch file. The following files
are not Windows system files, yet you do not
provide an explicit path to their location. How
can you be sure that they are found in the correct
location? "con2prt", for example, could be a batch
file on some machines!
- pccafini.exe
- con2prt /f
- logonuti.exe
- proxy.reg
- cafmetz_2.reg



In fact, even if the first line of the script is "pause" the script is
launched twice (without pressing any key)
For the non-windows files they're all present in the netlogon shared
folder.

Thanks for your concern in that case.

Kevin
 
P

Pegasus

Pegasus a écrit :
There is nothing visible in your logon script that would
explain a double invocation. On the other had I wonder
if some of the external program you call might not
shell out and call your batch file a second time. To
eliminate this possibility I would disable every call
to an external executable, check if the problem still
occurs, then re-enable them one by one.
A worrying aspect is the absence of full path
definitions in your batch file. The following files
are not Windows system files, yet you do not
provide an explicit path to their location. How
can you be sure that they are found in the correct
location? "con2prt", for example, could be a batch
file on some machines!
- pccafini.exe
- con2prt /f
- logonuti.exe
- proxy.reg
- cafmetz_2.reg



In fact, even if the first line of the script is "pause" the script is
launched twice (without pressing any key)
For the non-windows files they're all present in the netlogon shared
folder.

Thanks for your concern in that case.

Kevin
=====================
This is an excellent test you performed!

I would now do this as a test:

1. Open the user's account profile on the server,
then remove the reference to the logon script.
Now ask the user to log on to the problem machine.
Does he get any logon script?

2. Place a file called "netlogon.bat" into the folder
"%AllUsersProfile%\Start Menu\Programs\Startup",
with just two lines inside:

@echo off
call \\PDC\netlogon\logonscript.bat

Ask the user again to log on. How many times does
the script run?
 
K

Kevin

Sorry i wasn't at work since 12/07

well it's called just once, but that's more *static*, i got more than
one machine (ie 75-100) having this issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top