RE: Re[2]: Now what!? Try to bind, and it won't let me.
- Posted by bensler at mail.com Feb 28, 2002
- 557 views
Thomas Parslow (PatRat) wrote: > > Good morning. > > > Well, I wish it was. > > > I have found the problem. Windows will not hold an environment variable > > unless it's in autoexec.bat, apparently. > > > When I type in SET EUDIR=D:\EUPHORIA at the MS-DOS prompt, EUDIR goes > > away as soon as I close the window. I can leave the DOS prompt running, > > and EUDIR is not recognized in the Sanity DOS session. > > > Go figure. > > > Anyone know away around this? > > When you use the SET command it only sets the variable for the current > environment, when you start a new instance of the command interpreter > (command or cmd under nt/2k/xp) it inherits any current variables but > any changes you make to variables within it do not affect its > parents... > > How about using bat files to run .ew and .exw? You could do something > like this: > > Rename ex.exe and exw.exe to _ex.exe and _exw.exe, Make two batch > files named ex.bat and exw.bat in your euphoria\bin directory. Put this > into ex.bat: > > set EUDIR=D:\EUPHORIA > D:\EUPHORIA\BIN\_ex.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 > > And this into exw.bat: > > set EUDIR=D:\EUPHORIA > D:\EUPHORIA\BIN\_exw.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 > > I assume that would work... > > Thomas Parslow (PatRat) > E-Mail/Jabber: tom at almostobsolete.net > ICQ: 26359483 > > Here's a question... I'd like to be able to NOT use a batch file. For one thing, why can't I do it with EU !? Two, I'd like to be able to have an intuitive environment setup. I mean, being able to change %EUINC% from within the calling program, before it includes certain libs. Or, for example, maybe I'm using Karls EU interpretter for one project, while my environment is setup for EU reg'd. I'd like to be able to specify from within my program which ex.exe to use. I would set the %EUDIR% to C:\K_Euphoria. If I have to use a batch file, that means I have to bother to keep track of which ex.exe I need to use. My method would be automatic. As far as I can tell: system() -- opens it's own environment and so does system_exec() Another question: How can I call DOS commands w/o the DOS-box opening? For example, to copy or delete a file. Chris