Page 1 of 1 1
Topic Options
#178093 - 2007-07-19 06:21 PM Passing DOS variables into Kixtart
Icebun Offline
Fresh Scripter

Registered: 2007-07-19
Posts: 8
Loc: UK
Can someone please advise on the syntax to grab some DOS environmental variables (on WIndows Server 2003 and XP) into a Kixtart variable.

I am trying to pass the APPDATA path into a Kixtart variable.

This is so I can detect the presence of a file in the above path and delete it.

Thanks.

Top
#178094 - 2007-07-19 06:43 PM Re: Passing DOS variables into Kixtart [Re: Icebun]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
You can access the environment vars directly, just as you can in bat files - %ENVVARNAME%.

So...
 Code:
If InStr(%APPDATA%, 'xyzzy')
  ; do stuff the change the APPDATA variable
EndIf


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

Top
#178103 - 2007-07-20 08:52 AM Re: Passing DOS variables into Kixtart [Re: Glenn Barnas]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
'xyzzy'! Your age is showing Glenn LOL.
Top
#178104 - 2007-07-20 08:59 AM Re: Passing DOS variables into Kixtart [Re: Richard H.]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Because of this?
http://en.wikipedia.org/wiki/Colossal_Cave_Adventure

That isn't that old, or is it in reference to something else?

Top
#178106 - 2007-07-20 09:47 AM Re: Passing DOS variables into Kixtart [Re: NTDOC]
Icebun Offline
Fresh Scripter

Registered: 2007-07-19
Posts: 8
Loc: UK
Thanks Glen!

I never thought to try the standard Windows variables within Kixtart. How obvious.

Much appreciated.

Top
#178115 - 2007-07-20 01:38 PM Re: Passing DOS variables into Kixtart [Re: Icebun]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
IceBun: You're welcome

Richard: I have one word for you - PLUGH!

Doc: Age is relative. Since I was playing in '77 at college, and in '79 on CP/M, in computer years, that's a long time ago. Hell, even in people-years, it's a pretty long time ago.

Glenn
(now in a maze of twisty little subnets, all alike)
_________________________
Actually I am a Rocket Scientist! \:D

Top
#178133 - 2007-07-21 05:22 AM Re: Passing DOS variables into Kixtart [Re: Glenn Barnas]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
I was trying to give you a break on the age deal there Glenn ;\)

Time is flying bye

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
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.055 seconds in which 0.024 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