#201304 - 2010-12-29 09:07 AM
kix32.exe path to script bug?
|
S0GF1
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
Fresh Scripter
Registered: 2010-10-18
Posts: 8
Loc: Germany
|
|
Top
|
|
|
|
#201307 - 2010-12-29 12:12 PM
Re: kix32.exe path to script bug?
[Re: Mart]
|
S0GF1
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
|
|
|
|
#201309 - 2010-12-29 02:07 PM
Re: kix32.exe path to script bug?
[Re: Mart]
|
Glenn Barnas
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@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!
|
Top
|
|
|
|
#201311 - 2010-12-29 02:55 PM
Re: kix32.exe path to script bug?
[Re: Glenn Barnas]
|
S0GF1
Fresh Scripter
Registered: 2010-10-18
Posts: 8
Loc: Germany
|
Thank you both for your extensive posts, i really appreciate it.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 255 anonymous users online.
|
|
|