Page 1 of 1 1
Topic Options
#209738 - 2014-12-15 03:30 PM Running another .bat or kix from kix script
ddady Offline
Getting the hang of it

Registered: 2006-09-03
Posts: 98
Hii all,

I guess that the subject clears it all. I have a kix script which i want from it to run another kix script or a .bat that will run the other kix.

I have tried the "CALL", "RUN" and even "SHELL" with no luck.

Here is the code for the calling kix :
 Code:
If INGROUP ("SharePoint_Scan")
	CALL "\\172.30.168.229\netlogon\MPL\SharePoint_Scan.kix"
EndIf


In the destination folder i also put the KIX32.EXE and dll files.

What am i doing wrong?

Top
#209739 - 2014-12-15 03:46 PM Re: Running another .bat or kix from kix script [Re: ddady]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
First off, using IP addresses anywhere is pretty bad form.. for this, use your NetBIOS domain name. (\\MyDomain\NetLogon\...)

Call will run the other script in the same context as the current - you must be very careful with global vars and function declarations. What happens if you run a script from the command line with just the Call statement? Does it report any errors? If not, try placing the same call statement at the start of your main script (with all the variable declarations and function definitions present). Still OK?

Using Run or Shell requires that you invoke Kix32 first.. such as:
 Code:
$Cmd = '%COMSPEC% /c kix32.exe \\MyDomain\NetLogon\MPL\SharePoint_Scan.kix'
'About to run: ' $Cmd ?
Shell $Cmd
What DLL files are you putting in the NetLogon folder? You only Need Kix32.exe for Kix to work.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#209740 - 2014-12-15 07:06 PM Re: Running another .bat or kix from kix script [Re: Glenn Barnas]
ddady Offline
Getting the hang of it

Registered: 2006-09-03
Posts: 98
Thanks Glenn for the quick response. I will have answers tomorrow when i'll get back to work.
Top
#209741 - 2014-12-16 09:09 AM Re: Running another .bat or kix from kix script [Re: ddady]
ddady Offline
Getting the hang of it

Registered: 2006-09-03
Posts: 98
Ok,
When i run the code that calls the script from the command line, it works. I have tried your suggestion with no luck.
Finally i decided to run the second script code from the original script since i'm in the middle of a project and doesn't have time to keep on looking for a solution.

So, for now, thank you Glenn.

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org