Page 1 of 1 1
Topic Options
#20354 - 2002-04-22 09:03 PM 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
When my win2kpro clients log in the login scripts do not run.. (they run fine for NT and 9x)... When I execute the batch file manually, it errors with:

"CMD.EXE was started with '\\domain\netlogon' as the current directory path. UNC paths are not support. Defaulting to Windows directory. Script error: failed to find/open script!"

The scripts run if users log into 9x wks (IOW: not a rights issue)... help..

Top
#20355 - 2002-04-22 09:29 PM Re: 2000 clients in a 4.0 environment
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Make sure you specify the path properly when calling your script:

%0\..\kix32.exe %0\..\script.kix

Brian

Top
#20356 - 2002-04-22 09:33 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
it should be..this same batch file works for my 9x clients
Top
#20357 - 2002-04-22 09:43 PM Re: 2000 clients in a 4.0 environment
netixpc Offline
Fresh Scripter

Registered: 2002-02-13
Posts: 19
Loc: Lausanne - Switzerland
Post a copy of your batch file and script on the forum.

For info, on windows 2000 the black window appearing on the screen of win95 and NT computers, only appears minimized in Win2000. So maybe the script runs, but you don't see it ?

The error message you have is normal and should not stop the script working

[ 22 April 2002, 21:45: Message edited by: netixpc ]
_________________________
SAVE THE WORLD - PROTECT THE PLANET

Top
#20358 - 2002-04-22 09:44 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
nah... wish it did... but it doesnt cuz none of my drives are mapped..

is this what youre looking for??

@echo off
%0\..\kix32.exe %0\..\logon.kix

Top
#20359 - 2002-04-22 09:52 PM Re: 2000 clients in a 4.0 environment
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
vinings,

If that is the extent of your batch file, that is fine. However... it should be:

%0\..\kix32.exe logon.kix

Also please see MSKB (Q318689) applies to Windows XP

A Logon Script Does Not Work If %0 or %0\..\ Calls Multiple Commands (Q318689)

Also please post the version of KiXtart you're using as well as the complete script using the CODE tags so that your code is formatted here on the board. If the batch file is not the culprit then something you're calling or doing in the actual script may be the cause.

Top
#20360 - 2002-04-22 10:43 PM Re: 2000 clients in a 4.0 environment
New Mexico Mark Offline
Hey THIS is FUN
****

Registered: 2002-01-03
Posts: 223
Loc: Columbia, SC
Sounds like the problem is occurring before Kix32 is ever run.

1. How do you reference the logon.bat (or whatever name you use) in your user profiles?
2. What happens when you copy Kix32.exe, Logon.bat, and logon.kix files to a local directory on a Win2K machine and run them?
3. How are you trying to run the logon.bat file when testing. Do you double-click on it from Expolorer or run it from a CMD session?
4. Do you set the environment size parameter for CMD anywhere in your environment?
5. Is the code you posted the entire contents of your logon.bat file? Can you post your kix script as well? I know it seems nit-picky, but I can't count the number of times the pros on this board have found an error in the actual code of the batch and/or script files posted, even when the poster was ultra-confident that the problem couldn't possibly be their code.

Thanks,

New Mexico Mark

Top
#20361 - 2002-04-22 10:50 PM Re: 2000 clients in a 4.0 environment
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Mark.... I think you hit it on the nail, now that I re-read the original posting.

vinings says: "When I execute the batch file manually, it errors with:

"CMD.EXE was started with '\\domain\netlogon' as the current directory path. UNC paths are not support"

Something in the batch or environement must be wrong to get that error. It could also possibly be a "poorly worded" error that in fact is a rights issue.

Where is the file located (same domain, other domain) what are your SHARE and NTFS rights on the file?

Top
#20362 - 2002-04-23 04:01 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
i appreciate your help in this..

1) I reference logon.bat in the user manager under the profile on each account.

2) When I execute locally: It says "Script error: failed to find/open script!."

3) i double click logon.bat from explorer..
I tried it from the cmd prompt and it says "Script error: error in USE statement!." and then right below that in red text it says "Select".. nothing else..

4) No

5) Yes, what I posted is the entire batch file. I will post the code at the end of this message.

Note: I did not write this.. I am not savvy in this 'language'.
LOGON.KIX:

break off

; Syncronize Client's clock with NT Domain

;SETTIME "@lserver"

; Set user's home directory

USE h: @homeshr

; Set SHARE drive based on location of user

Select
Case INGROUP("Corporate")
use k: "\\server01\public"
use z: "\\server01\msds$"
Case INGROUP("Fortville")
use k: "\\fort01\public"
use z: "\\fort01\msds$"
Case INGROUP("Marietta")
use k: "\\Mar_bo01_nt\public"
use z: "\\server01\msds$"
Case INGROUP("Midway")
use k: "\\Midway\public"
use z: "\\midway\msds$"
Case INGROUP("St Catherines")
use k: "\\SC_BDC_NT\public"
use z: "\\sc_bdc_nt\msds$"
Case INGROUP("Washougal")
use k: "\\Washougal\public"
use z: "\\washougal\msds$"
Case INGROUP("Wesleyan")
use k: "\\Wesleyan\public"
use z: "\\server01\msds$"
Case INGROUP("West Oak")
use k: "\\Westoak\public"
use z: "\\server01\msds$"
ENDSELECT

; Set group drives based on business fuction

IF INGROUP("Customer Service")
use j: "\\mar_bo01_nt\CustServ$"
ENDIF
IF INGROUP("Executive Assistants")
use x: "\\server01\ExecAssist$"
ENDIF
IF INGROUP("Executives")
use n: "\\server01\Executives$"
ENDIF
IF INGROUP("HR_Payrol")
use p: "\\server01\HR_Payrol$"
use g: "\\serverhr\adpprog"
use n: "\\serverhr\adp$"
ENDIF
IF INGROUP("HS & E")
use s: "\\mar_bo01_nt\HS&E$"
ENDIF
IF INGROUP("Labs")
use L: "\\mar_bo01_nt\labs$"
ENDIF
IF INGROUP("Marketing")
use O: "\\server01\Marketing$"
ENDIF
IF INGROUP("Notes Users")
use T: "\\mar_bo01_nt\Notes Users$"
ENDIF
IF INGROUP("Plant_Managers")
use U: "\\server01\plantmgr$"
ENDIF
IF INGROUP("QA")
use Q: "\\mar_bo01_nt\QA$"
ENDIF
IF INGROUP("R&D")
use R: "\\mar_bo01_nt\R&D$"
ENDIF
IF INGROUP("Accounting")
use V: "\\server01\acct$"
ENDIF
IF INGROUP("MSDS")
use I: "\\mar_bo01_nt\i\groups"
ENDIF
IF INGROUP("SalesForce")
use s: "\\server01\groups\SalesForce"
ENDIF

quit

END OF LOGON.KIX

Top
#20363 - 2002-04-23 04:09 PM Re: 2000 clients in a 4.0 environment
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
After loggin in, run the script from a command prompt in debugging mode. Put DEBUG ON into the first line of your kixtart script to enable debugging. This will enable you to step throught the entire script. The Z: drive share will not work under Windows 9x. Replace all $ with $$ for the hidden shares. The last two dirve mapings will not work under Windows 9x and NT because they do not support mapping of folders below the shared folder.
_________________________
There are two types of vessels, submarines and targets.

Top
#20364 - 2002-04-23 04:16 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
sealeopard:

huh??

Our Z: mapping works fine on all of our 9x clients.. and the hidden shares map as well..

are you suggesting that I need to make your changes just so our 2k clients work properly?

Top
#20365 - 2002-04-23 04:25 PM Re: 2000 clients in a 4.0 environment
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=10;t=000037 for why to use $$ instead of $ in scripts.

The Z: drive is mapped to the NETLOGON share during the execution of a login script under Windows 9x and cannot be mapped to another share at that point. However, the Z: drive can be mapped to a drive share after the login script finished running. So, your script would work if you run it manually.

No, you will make those changes to have the script run properly under Windows 9x/NT.

Yes, you should add DEBUG ON so you can trace exactly where your script bombs under Windows 2000
_________________________
There are two types of vessels, submarines and targets.

Top
#20366 - 2002-04-23 05:27 PM Re: 2000 clients in a 4.0 environment
New Mexico Mark Offline
Hey THIS is FUN
****

Registered: 2002-01-03
Posts: 223
Loc: Columbia, SC
OK... let's take this step-by-step and see if we can figure out what is happening here.

When you tried to execute locally, you got a 'failed to find/open script' error. Try this:

1. Copy your logon.bat, logon.kix, and kix32.exe files from your domain netlogon share to your c:\temp directory.

2. From a command prompt execute the following commands (make sure you are not using a domain admin account)
c:
cd \temp
net use (one of your script-mapped drive letters:) /dele
net use (confirm the drive was deleted)
logon.bat
net use (confirm the drive was re-added)

3. This should run the local script and re-map the drive (confirming the script ran OK).

If that works, map a free drive letter to your netlogon directory. I.e. Net Use X: \\mypdc\netlogon

At the command prompt, type the following:
X: (Substitute the letter you mapped to the netlogon share)
net use (ScriptMappedDriveLetter:) /dele
net use (confirm the drive is deleted)
logon.bat
net use (confirm the drive was re-added)

Again, the problem seems to be that your 2K clients aren't even getting to the point where they run the script rather than internal script errors. (Though I'd still heed the advice given about $$ vs. $ and trying to map a directory under a share. Sometimes you can get away with bad syntax in KiXtart. It is pretty forgiving. But the $$ thing is just the way KiXtart differentiates a $ symbol from the start of a variable.)

Also, I notice you are running KiX32.exe from the netlogon share. Since we run a pure NT/2K network, I haven't had to wrestle with Win 9x and KiXtart issues. But it seems there are differences in which files need to be present, which is one reason the file(s) are copied to the local workstation and executed there. There are also significant speed advantages to running a local KiX32 executable. I don't think this necessarily has anything to do with the current problem, but you might want to keep it in mind for future improvements.

This is probably a very simple problem that will become obvious when we track it down. Sometimes those are the hardest to find, though.

Top
#20367 - 2002-04-27 10:24 AM Re: 2000 clients in a 4.0 environment
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
vinings !! what's up?

Did your issue get resolved? Do you still need assistance?

Please post an update when you get a chance.

Top
#20368 - 2002-04-29 04:40 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
sorry for the delay... anyhoo.. i copied all the relevant files to the c:\temp as instructed and it failed...

wait 22 seconds, then
"Script error : error in USE statement !.
Select" --- is in red text

that's it...

we did clean up our scripts a bit..

LOGON.KIX:
break off

; Syncronize Client's clock with NT Domain

;SETTIME "@lserver"

; Set user's home directory

USE h: @homeshr

; Set SHARE drive based on location of user

Select
Case INGROUP("Corporate")
use k: "\\server01\public"
use z: "\\server01\msds$"
Case INGROUP("Fortville")
use k: "\\fort01\public"
use z: "\\fort01\msds$"
Case INGROUP("Marietta")
use k: "\\Mar_bo01_nt\public"
use z: "\\server01\msds$"
Case INGROUP("Midway")
use k: "\\Midway\public"
use z: "\\midway\msds$"
Case INGROUP("St Catherines")
use k: "\\SC_BDC_NT\public"
use z: "\\sc_bdc_nt\msds$"
Case INGROUP("Washougal")
use k: "\\Washougal\public"
use z: "\\washougal\msds$"
Case INGROUP("Wesleyan")
use k: "\\Wesleyan\public"
use z: "\\server01\msds$"
Case INGROUP("West Oak")
use k: "\\Westoak\public"
use z: "\\server01\msds$"
ENDSELECT

; Set group drives based on business fuction

IF INGROUP("HR_Payrol")
use g: "\\serverhr\adpprog"
use n: "\\serverhr\adp$"
use p: "\\server01\HR_Payrol$"
ENDIF
IF INGROUP("Marketing")
use O: "\\server01\Marketing$"
ENDIF
IF INGROUP("Accounting")
use V: "\\server01\acct$"
ENDIF
IF INGROUP("Executive Assistants")
use x: "\\server01\ExecAssist$"
ENDIF
IF INGROUP("MSDS")
use I: "\\mar_bo01_nt\i\groups"
ENDIF

quit
END OF LOGIN.KIX

again.. 9x clients work fine, even w/ the Z: mapping.. we havent tried the $$ thing yet, obviously... I'm not the on editing them

also again... imho its crapping out before it even parses the login.kix; it seems that way

Top
#20369 - 2002-04-29 04:48 PM Re: 2000 clients in a 4.0 environment
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
I bet it's the line with 'use h: @homeshr' (in average the first statement after the offending line is in red [Big Grin] )

is it defined ? just run the following :

code:
break on
@homeshr
get $

what does it return ?

[ 29 April 2002, 16:49: Message edited by: jpols ]
_________________________



Top
#20370 - 2002-04-29 04:54 PM Re: 2000 clients in a 4.0 environment
HWYSTR Offline
Fresh Scripter

Registered: 2002-04-03
Posts: 11
Loc: Virginia, USA
When selecting the logon.bat from the netlogon share by double-clicking, because of the way it's processed within the cmd window, the error about script not found and unc is normal. The way the logon.bat processes from the netlogon process it should work fine. the error seems to be in the script....
Top
#20371 - 2002-05-11 04:56 PM Re: 2000 clients in a 4.0 environment
vinings Offline
Fresh Scripter

Registered: 2002-04-22
Posts: 7
well well.. lookee here.. these IS something wrong w/ my win2kpro machine..

this is in the event viewer.. and I dont knwo why its there.. it works fine on my buddy's laptop:

Event Type: Error
Event Source: KIXTART
Event Category: None
Event ID: 53
Date: 4/29/2002
Time: 11:40:38 AM
User: N/A
Computer: JWATTS
Description:
The description for Event ID ( 53 ) in Source ( KIXTART ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: UserGetInfo failed Error : The network path was not found. (0x35/53).

what is going on? I have ALL of the recent files.. (to my knowledge)

Top
#20372 - 2002-05-12 03:54 AM Re: 2000 clients in a 4.0 environment
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Can you create a miniscript with just the following lines:
code:
? 'Homeshare = '+@HOMESHR
? 'Error code = '+@ERROR+' - '+@SERROR

Then post the output of this script. Run this
1) from the console after you are logged in as a domain user
2) from the console after you are logged in as a domain administrator
3) as a login script logging in as a domain user
_________________________
There are two types of vessels, submarines and targets.

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 978 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.069 seconds in which 0.023 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