Page 1 of 1 1
Topic Options
#77866 - 2001-05-23 12:28 AM Two errors in KiXtart 2001 beta 2
Anonymous
Unregistered


Hi all...

As mentioned in Subj I have two errors when using KiXtart2001 beta 2:

I start my script with a logon.bat file:

@Echo Off
cls

IF "%OS%" == "Windows_NT" GOTO WinNT
XCOPY %0\..\kix32.exe %WINDIR%\ /D /H /I /R /V > NUL
XCOPY %0\..\kx16.dll %WINDIR%\System\ /D /H /I /R /V > NUL
XCOPY %0\..\kx32.dll %WINDIR%\System\ /D /H /I /R /V > NUL
XCOPY %0\..\kx95.dll %WINDIR%\System\ /D /H /I /R /V > NUL
GOTO RunScript

:WinNT
XCOPY %0\..\KIX32.EXE %WINDIR%\ /D /H /I /R /V > NUL
IF EXIST %WINDIR%\SYSTEM\KX16.DLL DEL /F %WINDIR%\SYSTEM\KX16.DLL
IF EXIST %WINDIR%\SYSTEM\KX32.DLL DEL /F %WINDIR%\SYSTEM\KX32.DLL
IF EXIST %WINDIR%\SYSTEM\KX95.DLL DEL /F %WINDIR%\SYSTEM\KX95.DLL
GOTO RunScript

:RunScript

%WINDIR%\Kix32.exe %0\..\logon.kix

:End

The problem comes when kix32.exe should run %0\..\logon.kix Sometimes (and ONLY sometimes) I get an error-msg stating: >>>KiXtart 2001<<< script error: failed to find/open script !

I just have to log off / log on again, and the script runs smoothly (sometimes i must try several times).

I never experienced this error with KiXtart 3.6x (and it is the same script)

My second error is less severe - just cosmetic to my script:
In the start of my logon.kix, I have this little section:

SELECT
CASE ((@TIME >= 00:00:00) AND (@TIME <= 09:00:00))
$TimeGreeting = "Good morning"
CASE ((@TIME > 09:00:00) AND (@TIME <= 18:00:00))
$TimeGreeting = "Good day"
CASE ((@TIME > 18:00:00) AND (@TIME <= 23:59:59))
$TimeGreeting = "Good evening"
ENDSELECT

And the script ends with a MESSAGEBOX (" $TimeGreeting and welcome, @fullname... You are now blah blah blah

Smart, I think - but with KiXtart 2001 beta2 it says good morning all the time - no matter what @TIME it is ??? Allthough my test-users never even noticed this, I find it a little annoying, and again: it works fine with kiXtart 3.6x

Anybody seen these errors - or is it errors in my script - or what ??? Any solutions ???

Regards

'Møller'

Top
#77867 - 2001-05-22 01:36 PM Re: Two errors in KiXtart 2001 beta 2
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
I don't know for the %0\..\
I got weird thing the first time i try to use it, so i gave up.

For you time error, try this, it work like a charm

code:

SELECT
CASE @TIME >= "00:00:00" AND @TIME <= "09:00:00"
$TimeGreeting = "Good morning"

CASE @TIME > "09:00:00" AND @TIME <= "18:00:00"
$TimeGreeting = "Good day"

CASE @TIME > "18:00:00" AND @TIME <= "23:59:59"
$TimeGreeting = "Good evening"
ENDSELECT


[This message has been edited by Popovk (edited 22 May 2001).]

_________________________
? getobject(Kixtart.org.Signature)

Top
#77868 - 2001-05-22 01:55 PM Re: Two errors in KiXtart 2001 beta 2
Anonymous
Unregistered


Hi,

the 1. "error" i donīt know maybe any other member of the board have tested it. With the 2. "error" i had the same problems. It seems it is really an error. Thatīs my workaround:

code:

$Time = Val(SubStr (@Time, 1, 2))
Select
Case $Time <= 9
$TimeGreeting = "Good morning"
Case$Time > 9 And $Time < 18
$TimeGreeting = "Good day"
Case $Time > 18
$TimeGreeting = "Good evening"
EndSelect

? $TimeGreeting
? Get $



Top
#77869 - 2001-05-22 02:12 PM Re: Two errors in KiXtart 2001 beta 2
Anonymous
Unregistered


Thanks Popovk & Tomik

Both solutions work - but I still hope someone has a solution for my first problem - that one is the worst :-(

Top
#77870 - 2001-05-22 03:59 PM Re: Two errors in KiXtart 2001 beta 2
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
As an alternative, you could copy the KIX Script on each login to the workstations.

And, make the following change:

%WINDIR%\Kix32.exe %WINDIR%\logon.kix

HTH,

- Kent

------------------
Moderator/Admin
Get/Post Scripts
http://www.win-scripts.com

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

Top
#77871 - 2001-05-22 04:23 PM Re: Two errors in KiXtart 2001 beta 2
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
IF I remember, %0\..\ stand for the current kix dir ?
in this case, you can use @STARTDIR (Directory from which KiXtart was started)

Or either this : @SCRIPTDIR (Directory of current script)

_________________________
? getobject(Kixtart.org.Signature)

Top
#77872 - 2001-05-22 04:27 PM Re: Two errors in KiXtart 2001 beta 2
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
%0\..\ stands for the directory you started the batch file in !
if the login.bat and the login kix are in the same dir .. it has to work

Jochen

_________________________



Top
#77873 - 2001-05-22 07:15 PM Re: Two errors in KiXtart 2001 beta 2
gdstiers Offline
Fresh Scripter

Registered: 1999-08-11
Posts: 14
Loc: Chattanooga, TN, USA
In the original post, KIX was loaded in Win9x Windows\System (or WinNT Windows\System - instead of System32), yet the script was initiated from Windows. I'm sure Windows will find the application, but the pointers are not very clean.
The KIX script actually resides in <bdc>\Netlogon, I suppose

------------------
gdstiers@tva.gov

_________________________
gdstiers@tva.gov

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

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