Page 1 of 1 1
Topic Options
#201304 - 2010-12-29 09:07 AM kix32.exe path to script bug?
S0GF1 Offline
Fresh Scripter

Registered: 2010-10-18
Posts: 8
Loc: Germany
Hello everyone,

i just had some weird behavior from kix, i never expected!
About two month ago i have redone the whole Logon-Script for the domain.

I did the following:

1. I created a subfolder in the netlogon for the new script with the new kix32.exe version in it.

\\myDC\Netlogon\Logon10\kix32.exe
\\myDC\Netlogon\Logon10\logon.kix

The old Script was located:
\\myDC\Netlogon\kix32.exe
\\myDC\Netlogon\startup.kix

I moved all the users to the new script in AD: "logon10\kix32.exe logon.kix".

2. After successfully running the script for two month i wanted to bring the new script down to the netlogon folder and add some small function.

I copied the files from \\myDC\Netlogon\Logon10\ to \\myDC\Netlogon\
At that point noone was using the old script in that folder anymore!

Then the following happend:\\myDC\Netlogon\Logon10\
\\myDC\Netlogon\

Both folders contain a kix32.exe and a script named the same in my case: logon.kix

In AD the user has the logon-script set to: logon10\kix32.exe logon.kix
Which started the script: \\myDC\Netlogon\Logon10\logon.kix as long as there was NO \\myDC\Netlogon\logon.kix existent.

As soon as a logon.kix file was in the \\myDC\Netlogon\ folder even if the script was set to: logon10\kix32.exe logon.kix it would start the file in the Netlogon folder not in the netlogon\logon10 folder.

I have not expected that at ALL! \:\)

Is it a bug or a normal behavior?

Thx

Top
#201305 - 2010-12-29 09:45 AM Re: kix32.exe path to script bug? [Re: S0GF1]
S0GF1 Offline
Fresh Scripter

Registered: 2010-10-18
Posts: 8
Loc: Germany
Just remembered it possible has to with the bug descriped here:
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Main=27028&Number=200287#Post200287

Top
#201306 - 2010-12-29 11:51 AM Re: kix32.exe path to script bug? [Re: S0GF1]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
I never experienced this so I do not have a solution but then again I never left out the path to the script. A "workaround" (I always do this) would be to set the users to \\domain\netlogon\kix32.exe \\domain\netlogon\logon.kix in AD.

Leaving out the path to the script is nice but could cause some unexpected behavior. If you include the path then you are sure the correct script gets executed. I would also suggest changing \\mydc to \\domain also if you have only one DC. If you add or remove a DC later no changes are required if you use \\domain instead of \\mydc.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#201307 - 2010-12-29 12:12 PM Re: kix32.exe path to script bug? [Re: Mart]
S0GF1 Offline
Fresh Scripter

Registered: 2010-10-18
Posts: 8
Loc: Germany
Hi,

thanks for your advice. I added the fullpath.

But after testing it really seems to be a bug that can cause some problems for people. If the script that is executed is a different one then before just by adding a file to another directory.

P.S. thats not the actual name of the server.

Top
#201308 - 2010-12-29 12:44 PM Re: kix32.exe path to script bug? [Re: S0GF1]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: S0GF1

...
But after testing it really seems to be a bug that can cause some problems for people. If the script that is executed is a different one then before just by adding a file to another directory.
...


Yes. Weird behavior indeed. Should be investigated by Ruud (the developer) imho.


 Originally Posted By: S0GF1

...
P.S. thats not the actual name of the server.
...


I know. What I meant to says was that calling it from \\domainname instead of \\dcname will make it more flexible and will prevent some errors when the DC you hardcoded in your script is unavailable for some reason. When you only have one DC it is not such a big issue but when you have multiple DC’s it will be very helpful.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#201309 - 2010-12-29 02:07 PM Re: kix32.exe path to script bug? [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
During the login process, the path to the netlogon share is inserted in the front of the PATH statement. This assures that "kix32.exe kixtart.kix" (for example) will be processed without any rooted path. If you place your script in subfolders, do not include a leading backslash. Never!!! (as in Never-Ever!) specify a DC name in the path to your netlogon folder. I can't tell you how many times this was done when a client had one DC, added DCs as they grew, and then wondered why things failed after retiring their original DC. It's bad practice - period.

By not specifying a rooted path to your login script and having the netlogon share inserted in front of the normal PATH statement, you are assured that the content from NetLogon will be used and not that from some other location. Specifying a domain to root the path will likely only work in a single-domain/forest environment, and may even cause the wrong script to run in larger, multi-domain forests.

When I need to troubleshoot these kind of problems, I use a batch file for a handful of users, similar to
 Code:
@Echo Off
REM Save a copy of the environment settings
Set >\\server\public\env\%USERNAME%_env.txt
REM Run the login script
kix32.exe kixtart.kix
Then, I can examine the state of the environment as it exists during the login process. You should see that the path begins with the Netlogon folder, followed by everything else.

I'd also pay close attention to the PATH, specifically the sequence of items. Many apps like to put their entries at the start of the path statement, which can cause strange things to happen because their commands and DLLs are used for everything, not just their apps. I usually run a script after application installs to re-order the path so that my Tools folder comes first, then the standard Windows folders, then application folders on C: followed by those on other drives. The PathInfo() UDF (see my web site's Resources/Kix UDFs page) can help to clean up the PATH by locating invalid, missing, & duplicate entries, and break the path into classes that can easily be re-ordered.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#201311 - 2010-12-29 02:55 PM Re: kix32.exe path to script bug? [Re: Glenn Barnas]
S0GF1 Offline
Fresh Scripter

Registered: 2010-10-18
Posts: 8
Loc: Germany
Thank you both for your extensive posts, i really appreciate it.
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 255 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.188 seconds in which 0.119 seconds were spent on a total of 14 queries. Zlib compression enabled.

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