Page 1 of 1 1
Topic Options
#142071 - 2005-06-21 07:30 PM Where and When to use %0\..\
tingri96 Offline
Fresh Scripter
****

Registered: 2004-06-15
Posts: 7
When a call %0\..\??.exe is made in a kixtart file there is no problem, but if the call is made to %0\..\??.kix I received the following error; Is not regonized as an internal or external command. Could some one help me on this?

Thanks

Top
#142072 - 2005-06-21 07:36 PM Re: Where and When to use %0\..\
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
You want to call the executable, then call the .kix script.

Code:

@echo off
REM Use of the syntax %0\..\ is discussed in Knowledge Base article Q121387.
@echo on
%0\..\kix32.exe %0\..\kixtart.kix


Alternatively, I've seen it recommended to use the following syntax for BATch file logon script calls.
Code:
 CALL %LOGONSERVER%\NETLOGON\kix32.exe %LOGONSERVER%\NETLOGON\kixtart.kix /f 


I don't know if there is a benefit to using either one, but they both work in my environment.
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#142073 - 2005-06-21 07:40 PM Re: Where and When to use %0\..\
tingri96 Offline
Fresh Scripter
****

Registered: 2004-06-15
Posts: 7
Sorry I mislead you on this. Inside a kix file where are calling a batch file using %0\..\???.bat and than it give us the error.
Top
#142074 - 2005-06-21 07:45 PM Re: Where and When to use %0\..\
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Aha, No problem.

Use the following syntax for calling a .kix file from within a KiXtart script. Make sure that the CALLed script is in the same directory as the CALLing script.

Code:
 CALL @ldrive+'\kixtart.kix' ; comment for what this script does

_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#142075 - 2005-06-21 07:56 PM Re: Where and When to use %0\..\
tingri96 Offline
Fresh Scripter
****

Registered: 2004-06-15
Posts: 7
Inside of a kixtart file we are calling a batch file. Here an example, the kix file name is SMS.kix

---------- C:\SCRIPT\D_KILBORN\SMS.KIX
[6] SHELL "%COMSPEC% /E:1024 /C %0\..\smslsxp.bat"

this is giving us this error; %0\..\smsls.bat is not recongnized as an internal or external program or batch file

Top
#142076 - 2005-06-21 08:02 PM Re: Where and When to use %0\..\
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Would it be possible for you to recreate the code inside the batch file as a KiXtart script, or is the BATch file too specialized/complicated/messy/etc..?

The reason I ask is because I've read a lot of posts where people are directed to convert BATch files to KiXtart scripts when possible.

There are also many posts that define the proper use of the SHELL command. As I was recently informed, , the KiXtart Manual that comes with KiXtart is a great resource.

Lastly, verify that your "smslsxp.bat" file is located in the same directory as the "SMS.KIX" file.
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#142077 - 2005-06-21 08:05 PM Re: Where and When to use %0\..\
tingri96 Offline
Fresh Scripter
****

Registered: 2004-06-15
Posts: 7
The batch file is too specialized and also we have over 400 scripts. I will verify with the KiXtart manual

thanks

Top
#142078 - 2005-06-21 08:14 PM Re: Where and When to use %0\..\
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
By the way,

Here is an example from the KiXtart Manual on the proper use of SHELL when calling a BATch file.
Code:
 
SHELL "C:\WINNT\SYSTEM32\CMD /E:1024 /C " + @LDRIVE + "\SMSLS.BAT"



Try replacing the %0\..\ with a cancatenated @LDRIVE macro (that is, if your patch file is at LOGONSERVER\NETLOGON\)
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#142079 - 2005-06-21 08:20 PM Re: Where and When to use %0\..\
tingri96 Offline
Fresh Scripter
****

Registered: 2004-06-15
Posts: 7
I will try that and let you know

Thanks for your time

Top
#142080 - 2005-06-21 10:25 PM Re: Where and When to use %0\..\
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sms.bats, nooo...
just skip it and call sms directly.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1635 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.062 seconds in which 0.026 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