FLANKER
(Just in Town)
2017-09-29 02:50 PM
How to pass a macro to a variable in kix script and use that variable in a batch script?

Hi guys
I'm very new to kix script and I'm trying to find a way to pass a macro in variable and then use that variable in a batch file, this will be used to capture users logon information. I found some old posts regarding this but I haven't been able to get it to work. I appreciate if you could kindly guide me.

My kix script: (I would like to use following macro values in a batch file)

 Code:
if redirectOutput($file)=0
    ? "@WKSTA, @date, @time, @userid, @LDOMAIN*"
endif





AllenAdministrator
(KiX Supporter)
2017-09-29 03:29 PM
Re: How to pass a macro to a variable in kix script and use that variable in a batch script?

I used to ask questions like this way back when I used batch, and I would love to ask you another question. What is it that you are doing that you need to do this, and why couldn't you just use Kixtart exclusively?

Kixtart is way more powerful and so much easier to work with. Unless you have some gigantic batch file, I would bet it would take you less than a day to convert.


FLANKER
(Just in Town)
2017-09-29 04:33 PM
Re: How to pass a macro to a variable in kix script and use that variable in a batch script?

Hi Allen, Thanks for your reply. I'm working with existing logon scripts and I'm trying to make a process using kix script to capture user's information such as computername ,logon date and etc... and pass it to the batch file and write it to sql server. I found a very easy and fast way to write to sql server using the existing batch file used for logon script.

AllenAdministrator
(KiX Supporter)
2017-09-30 05:43 PM
Re: How to pass a macro to a variable in kix script and use that variable in a batch script?

Here's one way... I wrote this years ago.

Kixstart.bat
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=74821#Post74821


Stickney
(Just in Town)
2017-11-05 03:11 PM
Re: How to pass a macro to a variable in kix script and use that variable in a batch script?

 Originally Posted By: Alleen
Here's one way... I wrote this years ago.

Kixstart.bat


Works like a charm. Thanks for sharing Allen.