Page 1 of 2 12>
Topic Options
#27808 - 2002-08-27 03:33 PM script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
I know this topic has been gone over before (I did some searching before asking), but nothing seems to have helped so far. I'm pretty new to kixstart, and have about 6 servers running with it. The problems stated above comes from logging on with Win2K Pro boxes. The scripts work fine on all 95/98 boxes. The weird thing I've found, is that all servers run the same scripts/versions, with just some small rewording. Probably 3 of the 6 work fine with Win2K boxes, and the others don't. 1 server was recently reloaded, and is using the exact same scripts, and now that doesn't work either. Any suggestions? I can supply a copy of the script if needed. TIA

[ 27. August 2002, 15:34: Message edited by: daryl ]

Top
#27809 - 2002-08-27 03:35 PM Re: script error: failed to find/open script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please post the method that you use to call your script and the batch file if you use one.

[ 27. August 2002, 15:36: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#27810 - 2002-08-27 04:05 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
By default, a windows 9x/NT/2000 login script would be called by a batch file like
code:
%0\..\kix32.exe %0\..\login.kix

Please see the KiXtart Manual for a more exhaustive primer on login script calling or read the Kixtart Starter's Guide
Also, please post the batch file used to call the KiXtart script.

[ 27. August 2002, 16:49: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#27811 - 2002-08-27 06:31 PM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
Here is the batch file I'm using.
@echo off
IF "ITs%OS%"=="ITsWindows_NT" GOTO ClientIsNT

:ClientIs9x
if not exist %windir%\kix\kix32.exe md %windir%\kix
if not exist %windir%\kix\kix32.exe copy /y \\server1\netlogon\kix32.exe %windir%\kix
if not exist %windir%\system\kx32.dll copy /y \\server1\netlogon\kx32.dll %windir%\system
if not exist %windir%\system\kx95.dll copy /y \\server1\netlogon\kx95.dll %windir%\system
if not exist %windir%\system\kx16.dll copy /y \\server1\netlogon\kx16.dll %windir%\system
%WINDIR%\kix\kix32.EXE \\server1\netlogon\kick95.kix
C:
CD %WINDIR%
goto EXITBAT

:ClientIsNT
If not exist %systemroot%\kix\kix32.exe md %systemroot%\kix
if not exist %systemroot%\kix\kix32.exe copy %logonserver%\netlogon\kix32.exe %systemroot%\kix\kix32.exe
%SYSTEMROOT%\KIX\KIX32.EXE \\server1\netlogon\kick.kix
C:
CD %SYSTEMROOT%

GOTO EXITBAT
:EXITBAT

Top
#27812 - 2002-08-27 06:52 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The way your batch file works, it'll always use the scripts from SERVER1 instead of the authenticating server.

Please see the Kixtart Starter's Guide for generic example login batch files. Generally, you want to run the login script form the server that authenticates you and not hardcode a server.
_________________________
There are two types of vessels, submarines and targets.

Top
#27813 - 2002-08-27 08:11 PM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
server1 is the authenticating server.
Top
#27814 - 2002-08-27 08:16 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
How can that be if your are using multiple DCs (as stated in your first post). Are you sure that SERVER1 will ALWAYS authenticate? The better method is not to hardcode anything.
_________________________
There are two types of vessels, submarines and targets.

Top
#27815 - 2002-08-27 08:34 PM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
sorry for the misunderstanding. There are multiple servers using kixstart, but none are in the same location, and each is the PDC.
Top
#27816 - 2002-08-27 08:36 PM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
the main reason I tried that, was due to some of the articles I did a search on. There were a few that seemed to warn from using %logonserver% as opposed to what I did. Was that not true?
Top
#27817 - 2002-08-27 10:32 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Without knowing what the articles said, I can't comment on this., However, I haven't experienced any problems using %LOGONSERVER% or %0 notation to indicate where to download the script from. I would alwasy download the script from the authenticating server, and I would also not hardcode this.

Please give one of the example login.bat files that are posted to this board and that can be found in the KiXtart Manual a try and report back. alos, please start with a really simple login script that just displays a message when run successfully. Once you get the script started correctly, you can move on and expand the script.
_________________________
There are two types of vessels, submarines and targets.

Top
#27818 - 2002-08-27 10:56 PM Re: script error: failed to find/open script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, only thing I can think of logonserver is that it does not worky with win9x

on the other hand %0 does not work for xp.

 
_________________________
!

download KiXnet

Top
#27819 - 2002-08-30 03:29 AM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
well, I tried a few other batch files, and a few other scripts, some very simple, and could not seem to get anything to work. Even though I'm sure there is a better answer, here's what I did. The above batch was changed to below.@echo off
IF "ITs%OS%"=="ITsWindows_NT" GOTO ClientIsNT

:ClientIs9x
if not exist %windir%\kix\kix32.exe md %windir%\kix
if not exist %windir%\kix\kix32.exe copy /y \\deathstar\netlogon\kix32.exe %windir%\kix
if not exist %windir%\system\kx32.dll copy /y \\deathstar\netlogon\kx32.dll %windir%\system
if not exist %windir%\system\kx95.dll copy /y \\deathstar\netlogon\kx95.dll %windir%\system
if not exist %windir%\system\kx16.dll copy /y \\deathstar\netlogon\kx16.dll %windir%\system
%WINDIR%\kix\kix32.EXE \\deathstar\netlogon\kick95.kix
C:
CD %WINDIR%
goto EXITBAT

:ClientIsNT
If not exist %systemroot%\kix\kix32.exe md %systemroot%\kix
if not exist %systemroot%\kix\kix32.exe copy %logonserver%\netlogon\kix32.exe %systemroot%\kix\kix32.exe
if not exist %systemroot%\kix\kick.kix copy %logonserver%\netlogon\kick.kix %systemroot%\kix\kick.kix
%SYSTEMROOT%\KIX\KIX32.EXE kick.kix
C:
CD %SYSTEMROOT%

GOTO EXITBAT
:EXITBAT

As you can tell, it also copies the kick.kix script over to the local "kix" folder, and executes it from there. So far, no problems. I know there has to be a better way, but time has been an issue, so here's where I am. If anybody has a better solution, please let me know.

Top
#27820 - 2002-08-30 04:28 AM Re: script error: failed to find/open script
NTDOC Administrator Offline
Administrator
*****

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

Here is a batch file for copying the files to the local system. I WOULD NOT copy the script itself as you will really be in for a difficult time keeping things in synch.

code:
@ECHO OFF
CLS
IF "%OS%" == "Windows_NT" GOTO Kix_WinNT
IF NOT "%OS%" == "Windows_NT" GOTO Kix_Win9X
:Kix_WinNT
IF EXIST %windir%\kix411.ok GOTO Server
ECHO Please wait... Updating the KiXtart program
ECHO files on your system. This may take a few minutes...
IF EXIST %windir%\kix32.exe DEL %windir%\kix32.exe
IF EXIST %windir%\kx95.dll DEL %windir%\kx95.dll
IF EXIST %windir%\kx16.dll DEL %windir%\kx16.dll
IF EXIST %windir%\kx32.dll DEL %windir%\kx32.dll
IF EXIST %windir%\system32\kix32.exe DEL %windir%\system32\kix32.exe
IF EXIST %windir%\system32\kx95.dll DEL %windir%\system32\kx95.dll
IF EXIST %windir%\system32\kx16.dll DEL %windir%\system32\kx16.dll
IF EXIST %windir%\system32\kx32.dll DEL %windir%\system32\kx32.dll
XCOPY %0\..\kix32.exe %windir%\. /H /I /R > NUL
@echo KiXtart v4.11: installation completed > %windir%\kix411.ok
GOTO Server
:Kix_Win9X
IF EXIST %windir%\kix411.ok GOTO Server
ECHO Please wait... Updating the KiXtart program
ECHO files on your system. This may take a few minutes...
IF EXIST %windir%\kix32.exe DEL %windir%\kix32.exe
IF EXIST %windir%\kx95.dll DEL %windir%\kx95.dll
IF EXIST %windir%\kx16.dll DEL %windir%\kx16.dll
IF EXIST %windir%\kx32.dll DEL %windir%\kx32.dll
IF EXIST %windir%\system\kx95.dll DEL %windir%\system\kx95.dll
IF EXIST %windir%\system\kx16.dll DEL %windir%\system\kx16.dll
IF EXIST %windir%\system\kx32.dll DEL %windir%\system\kx32.dll
XCOPY %0\..\kix32.exe %windir%\. /H /I /R > NUL
XCOPY %0\..\kx16.dll %windir%\system\. /H /I /R > NUL
XCOPY %0\..\kx32.dll %windir%\system\. /H /I /R > NUL
XCOPY %0\..\kx95.dll %windir%\system\. /H /I /R > NUL
@echo KiXtart v4.11: installation completed > %windir%\kix411.ok
:Server
@echo off
REM ** BEGIN CHECK FOR DIAL-UP CONNECTION **
:CHECK_RAS
CLS
echo Please wait - Network authentication is being verified . . .
ECHO.
IF EXIST %WINDIR%\CHECKRAS.EXE GOTO LOCAL
copy %0\..\CHECKRAS.EXE %WINDIR%
GOTO LOCAL

:LOCAL
%WINDIR%\CHECKRAS.EXE > nul
IF ERRORLEVEL 1 GOTO SLOW
GOTO NOT_RAS

:SLOW
echo Please wait - Network authentication is being verified . . .
echo.
%windir%\Kix32.exe %0\..\kix32.exe DIALIN.kix
GOTO END

REM ** END CHECK FOR DIAL-UP CONNECTION **

:NOT_RAS
GOTO KIX

:KIX
IF EXIST %windir%\Kix32.exe GOTO LOCALKIX
%0\..\kix32.exe %0\..\logon.KIX
GOTO END

:LOCALKIX
@ECHO OFF
IF NOT "%OS%" == "Windows_NT" GOTO LOCAL9X
%windir%\Kix32.exe %0\..\logon.KIX
GOTO END

:LOCAL9X
@ECHO OFF
IF EXIST %windir%\system\kx95.dll GOTO STEP1
%0\..\kix32.exe %0\..\logon.KIX
GOTO END

:STEP1
IF EXIST %windir%\system\kx16.dll GOTO STEP2
%0\..\kix32.exe %0\..\logon.KIX
GOTO END

:STEP2
IF EXIST %windir%\system32\kx32.dll GOTO STEP3
%0\..\kix32.exe %0\..\logon.KIX
GOTO END

:STEP3
IF EXIST %windir%\kix32.exe GOTO STEP4
%0\..\kix32.exe %0\..\logon.KIX
GOTO END

:STEP4
%windir%\Kix32.exe %0\..\logon.KIX
GOTO END

:END

Make sure ALL PDC/BDC have the EXACT same files and is SHARED and users have READ access.

Top
#27821 - 2002-08-30 04:29 AM Re: script error: failed to find/open script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Here is another batch file to run things depending upon OS if you want.

code:
@ECHO OFF
IF NOT "%OS%" == "Windows_NT" GOTO WIN9X
VER|FIND /I "XP" >NUL && IF %ERRORLEVEL% EQU 0 GOTO XP
IF not "%ALLUSERSPROFILE%" == "" GOTO WIN2K
IF "%OS%" == "Windows_NT" GOTO NT4
GOTO END
:XP
ECHO Found Windows XP
REM Or what ever command you want to run.
GOTO END
:WIN2K
ECHO Found Windows 2000
REM Or what ever command you want to run.
GOTO END
:NT4
ECHO Found Windows NT 4
REM Or what ever command you want to run.
GOTO END
:WIN9X
ECHO Found Windows 9x
REM Or what ever command you want to run.
GOTO END
:END



Top
#27822 - 2002-08-30 04:52 AM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The COPY routines will fail under Windows 2000/XP (and possibly under NT, too) if the user doesn't have WRITE rights to the respective folder, which they do not have by default.

You should really start with a simple batch file that just calls the script from the NETLOGON folder. Once you get this working you can start copying the file to the local machines.

[ 30. August 2002, 04:52: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#27823 - 2002-08-30 11:03 AM Re: script error: failed to find/open script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Yes, Jens is quite correct.
I'm so used to our users having local admin rights I often forget many other shops do not.

Getting it running in the first place should be your main concern.

A batch file calling this
kix32.exe logon.KIX
should work for NT/2000

Windows 9x will need something like this
%0\..\kix32.exe %0\..\logon.KIX
this should actually work for NT/2000 as well but is not required for NT/2000

[ 30. August 2002, 11:04: Message edited by: NTDOC ]

Top
#27824 - 2002-08-30 04:49 PM Re: script error: failed to find/open script
daryl Offline
Fresh Scripter

Registered: 2002-08-16
Posts: 7
sealeopard,
I have tried other simple scripts, other batch files, etc. Nothing seems to be helping, and I don't understand why. That's why I'm here asking for help. I'm going to try the examples that NTDOC has posted, and see where that leads. Thanks for the help everybody!

Top
#27825 - 2002-08-30 04:57 PM Re: script error: failed to find/open script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Put a PAUSE right before the line that calls the KiXtart script in your batch file. This will force you to hit a key in order to load the script.

Then put a DEBUG ON into the very first line of your script. This will force you to step through the script.

This way you will be able to find out whether the script loads at all.

Alos, start with a simple script that is called with a simple batch file where all files are located on the NETLOGON share.

something along these lines:
code:
rem batch file

echo loading Kixtart Script

pause

%0\..\kix32.exe %0\..\test.kix

code:
debug on
; test.kix
? 'This is the test KiXtart script
?
? 'Press [ENTER] to continue'
gets $a

The replace the test.kix with your login script and repeat. then start modifying the batch file to load the DLLs and executables locally nad pay attention to Windows NT/2000 rights.

I'm using the following batch file to call my kiXtart login script:
code:
@ECHO OFF

REM format console window to default size
MODE CON: COLS=80 LINES=25

ECHO Verifying / Updating Script Software Installation

REM detect the operating system and go to the appropriate segment

VER | find "NT" > nul
IF not errorlevel 1 GOTO Win_NT

VER | find "2000" > nul
IF not errorlevel 1 GOTO Win_2K

VER | find "XP" > nul
IF not errorlevel 1 GOTO Win_XP

VER | find "98" > nul
IF not errorlevel 1 GOTO Win_98

VER | find "95" > nul
IF not errorlevel 1 GOTO Win_95

VER | find "Millennium" > nul
IF not errorlevel 1 GOTO WIN_ME

GOTO DOS

REM client is running DOS
:DOS
ECHO.
ECHO No Login Script Available For DOS Clients
ECHO.
GOTO End

REM client is running Windows 9x
:Win_95
:Win_98
:Win_ME
ECHO.
ECHO Checking KiXtart files for Windows 9x/ME
ECHO.
REM the DEL command removes any Kixtart file from the %WINDIR%\SYSTEM directory
IF EXIST %WINDIR%\SYSTEM\KIX32.EXE DEL %WINDIR%\SYSTEM\KIX32.EXE >NUL
IF EXIST %WINDIR%\SYSTEM\KX*.DLL DEL %WINDIR%\SYSTEM\KX*.DLL >NUL
IF EXIST %WINDIR%\KIX*.DAT DEL %WINDIR%\KIX*.DAT >NUL
%WINDIR%\COMMAND\XCOPY %0\..\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\KX*.DLL %WINDIR%\ /D /H /I /R /V /C >NUL
%WINDIR%\COMMAND\XCOPY %0\..\KIXTART.411 %WINDIR%\ /D /H /I /R /V /C >NUL
GOTO Run9xScript

REM client is running Windows NT/2000/XP
:Win_NT
:Win_2K
:Win_XP
ECHO.
ECHO Checking KiXtart files for Windows NT/2000/XP
ECHO.
REM the DEL command removes any Kixtart file from the %WINDIR%\SYSTEM32 directory
IF EXIST %WINDIR%\SYSTEM32\KIX32.EXE DEL /F /Q %WINDIR%\SYSTEM32\KIX32.EXE >NUL
IF EXIST %WINDIR%\SYSTEM32\KX*.DLL DEL /F /Q %WINDIR%\SYSTEM32\KX*.DLL >NUL
IF EXIST %WINDIR%\KX*.DLL DEL /F /Q %WINDIR%\KX*.DLL >NUL
IF EXIST %WINDIR%\KIX*.DAT DEL %WINDIR%\KIX*.DAT /Q >NUL
ECHO y| XCOPY %LOGONSERVER%\NETLOGON\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL >NUL >NUL
ECHO y| XCOPY %LOGONSERVER%\NETLOGON\KIXTART.411 %WINDIR%\ /D /H /I /R /V /C >NUL >NUL >NUL
GOTO RunScript

REM run the logon script for Windows NT/2K/XP
:RunScript
ECHO Loading Logon Script for Windows NT/2K/XP, Please Wait...
ECHO.

REM check whether Kixtart is installed locally
IF EXIST %WINDIR%\KIXTART.411 GOTO LocalExe
IF EXIST %LOGONSERVER%\NETLOGON\KIXTART.411 GOTO RemoteExe
GOTO KixtartError

REM Kixtart is installed locally
:LocalExe
%WINDIR%\KIX32.EXE %LOGONSERVER%\NETLOGON\LOGIN.KIX
GOTO End

REM Kixtart is not installed locally
:RemoteExe
%LOGONSERVER%\NETLOGON\KIX32.EXE %LOGONSERVER%\NETLOGON\LOGIN.KIX
GOTO End

REM run the logon script for Windows 9x/ME
:Run9xScript
ECHO Loading Logon Script for Windows9x/ME, Please Wait...
ECHO.

REM check whether Kixtart is installed locally
IF EXIST %WINDIR%\KIXTART.411 GOTO 9xLocalExe
IF EXIST %0\..\KIXTART.411 GOTO 9xRemoteExe
GOTO KixtartError

REM Kixtart is installed locally
:9xLocalExe
%WINDIR%\KIX32.EXE %0\..\LOGIN.KIX
GOTO End

REM Kixtart is not installed locally
:9xRemoteExe
%0\..\KIX32.EXE %0\..\LOGIN.KIX
GOTO End

:KixtartError
REM Display an error message and notify the Systems Administrator since the user won't be doing it anyway
ECHO.
ECHO Error loading the NMRC-NT logon script
ECHO.
ECHO Please notify the Systems Administrator!
ECHO.
NET SEND REDPOINT "Error loading the NMRC-NT logon script for user "%USERNAME%" on computer "%COMPUTERNAME% >NUL >NUL
PAUSE
GOTO End

:End
ECHO.
ECHO.
ECHO Finishing Login...

@ECHO OFF
CLS
EXIT 0

It has not been fully tested so I cannot guarantee that it does work under Windows 9x but I have it working under Windows 2000.
_________________________
There are two types of vessels, submarines and targets.

Top
#27826 - 2002-12-03 02:09 PM Re: script error: failed to find/open script
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We see each time very complex script, which works of course.
We are using following script for all windows versions.
code:
@echo off
if not exist %windir%\kix412.ok %0\..\kix412update.exe /q
if exist %windir%\kix32.exe %windir%\kix32.exe %0\..\your_script.kix
if not exist %windir%\kix32.exe %0%\..\kix32.exe %0\..\your_script.kix
@echo off

The iexpress installation package kix412update.exe can be found on our
site.
greetings.

btw: symbol  - on our homepage has been linked to related http://kixtart.org topic.

[ 03. December 2002, 14:59: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#27827 - 2002-12-03 02:28 PM Re: script error: failed to find/open script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mca, any news on updating the update-package?
as checking of ok file is just the same as checking for c:\boot.ini

it's "security" by ignorance.
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 778 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.077 seconds in which 0.029 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