Page 1 of 1 1
Topic Options
#114161 - 2004-02-17 12:31 PM Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
Hey,

Something weird is happening at one of our terminal servers: the logon script starts two times at the same moment at user logon.
Configuring another logon script works as expected, though runs twice also.
When no logon script is configured, no script runs, as expected.
At the other servers the is only one window running the script.
I am unable to figure out what is happening here and how to fix it so your help is welcome!

Tristam

Top
#114162 - 2004-02-17 02:04 PM Re: Logon script fires twice / runs double
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
weird, sounds like there is 2 policies forcing it to happen.
could you do a trace (audit maybe) into log to see what is starting the script?
_________________________
!

download KiXnet

Top
#114163 - 2004-02-17 03:10 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can you show us your script? How are you calling the script in AD/NT Domain?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114164 - 2004-03-16 02:03 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
The test script is test.bat
Code:

@echo %time%
@pause



(the output in both windows is exactly the same)

This script starts two times when set as user logon script. As does the original logon.cmd still.

No couse fount in a resultant set of policys from the afected terminal server either.

Even "me too" reply are welcome!

Top
#114165 - 2004-03-16 02:33 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can you show what is in your test.bat? You showed us your .Kix script..

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114166 - 2004-03-16 03:08 PM Re: Logon script fires twice / runs double
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Are you sure it is not just your %SYSTEMROOT%\System32\UsrLogon.CMD firing?

This is the appalling bit of crap that runs the "compatibility" scripts. One of the first things I do when I build a new server is disable this.

If it is running, you may see two login consoles.

Top
#114167 - 2004-03-16 03:14 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
here we go again, this time contents actual login.cmd:
Code:
@echo off
@%0\..\kix\Kix32.exe %0\..\login.kix

The contents of the script does not affect the double execution of the script though.

Top
#114168 - 2004-03-16 04:27 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I would have to agree with Richard..

However, have you had a look at the following?
(1)XP Logon Optimization - Windows XP Professional Fast Logon Optimization
Description of the Windows XP Professional Fast Logon Optimization Feature
(2) How you are starting the Script - A Logon Script Does Not Work If %0 or %0\..\ Calls Multiple Commands

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114169 - 2004-03-16 05:17 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
Thanks for all the suggestions.

For the affected terminal server I made a resulting set of policies; no policies are set for logon events / behaviors.
The scripts fire at the same millisecond; when a policy and a user logon script where configured i'd expect some difference in start time.

Exiting the usrlogon script at line 1 didn’t make a difference.

Since the logon script firing twice the “My documents” folder pops up in explorer. No reference found to that action either in GPO, run keys etc. ‘thought I mention it.

Top
#114170 - 2004-03-17 01:46 PM Re: Logon script fires twice / runs double
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Just out of interest....

What happens if no usrlogon script is used? Does a script still run?

Forget that, just saw your initial post

Does this happen on any other pcs?



Edited by AzzerShaw (2004-03-17 01:49 PM)
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#114171 - 2004-03-17 02:36 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Back to Richard's suggestion about USRLOGON..

What if you put the following at the end of USRLOGON.CMD -
Code:

ECHO USRLOGON END OF FILE
PAUSE


Then Put the following in your KiX script -
Code:

?'END OF KiXtart Script'
?'Press a key to continue'
GET $k


What this should do is pause your USRLOGON.CMD and then pause the KiX script and does it still show two windows for KiXtart?

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114172 - 2004-03-17 05:15 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
Just one W2k3 terminal server is doint this. The machine is a clone from a server that fires the login script once.
For months they ran OK.
Has anybody a idea which DLL are involved in execution the script. Maybe i need te replace some.

Top
#114173 - 2004-03-17 05:20 PM Re: Logon script fires twice / runs double
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Do you get the problem if you log in at the console?
Top
#114174 - 2004-03-17 05:32 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
Yep, normal users and admins.
Top
#114175 - 2004-03-17 06:54 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Back to the specifics..

Using the suggestion I provided.. Is is the USRLOGON.CMD or the KiX script that comes up twice?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114176 - 2004-03-18 05:18 PM Re: Logon script fires twice / runs double
Tristam Offline
Fresh Scripter

Registered: 2004-02-17
Posts: 8
When both scripts, USRLOGON.CMD kix, are paused at the end i end up four windows. Two running the kix script and two the usrlogon.

I did find something of interest:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon\Userinit
has a value M:\WINDOWS\system32\userinit.exe, M:\WINDOWS\system32\userinit.exe,

When I changed the value to M:\WINDOWS\system32\userinit.exe, the script runs only once.
At the other terminal server the value is M:\WINDOWS\system32\userinit.exe, M:\WINDOWS\system32\userinit.exe, but only one instant of the script runs.

What does your registry and experience to say about this?

Top
#114177 - 2004-03-18 05:32 PM Re: Logon script fires twice / runs double
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
My WIn2K Terminal server only has one instance.

C:\WINNT\system32\userinit.exe,
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#114178 - 2004-03-18 07:08 PM Re: Logon script fires twice / runs double
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Just one..

C:\WINDOWS\system32\userinit.exe,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.08 seconds in which 0.035 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org