Page 1 of 1 1
Topic Options
#212704 - 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?
FLANKER Offline
Just in Town

Registered: 2017-09-29
Posts: 2
Loc: Canada
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





Edited by FLANKER (2017-09-29 02:50 PM)

Top
#212705 - 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? [Re: FLANKER]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
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.

Top
#212706 - 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? [Re: Allen]
FLANKER Offline
Just in Town

Registered: 2017-09-29
Posts: 2
Loc: Canada
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.
Top
#212708 - 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? [Re: FLANKER]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Here's one way... I wrote this years ago.

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

Top
#212827 - 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? [Re: Allen]
Stickney Offline
Just in Town

Registered: 2017-10-28
Posts: 1
Loc: Houston, TX
 Originally Posted By: Alleen
Here's one way... I wrote this years ago.

Kixstart.bat


Works like a charm. Thanks for sharing Allen.


Edited by Stickney (2021-10-29 08:05 PM)

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 (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.022 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