[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: U2 Query: file locations



** Reply to message from "Patricia M. Godfrey"  on Sat, 26
Nov 2005 17:38:32 -0500


> Interestingly, if one
> sets the path within a DOS command session--at least in 9x; I wonder how
> it works in the NT flavors--, once the session ends, the path apparently
> gets reset automatically to what it was before.

Same in NT. Sure, because variables set in any one session of the command
processor will apply only to that session. If, in 9x, you add them to your
AUTOEXEC.BAT file, then each time a new command processor session is opened, it
reads AUTOEXEC and loads the variables into that session -- so you have the
illusion that your environment variables are "global". But actually they're
just being applied to each individual session, either via AUTOEXEC or via
Windows Registry keys.

> If one is configuring Xy to run off a flash or ZIP drive, using Carl's
> Portable configuration, would it be permissible to put the XyUtils that
> README.1st specifies should go in "the *first* directory in the DOS Path
> (in Win9X, usually C:\WINDOWS; in WinNT, usually C:\WINDOWS\system32 or
> C:\WINNT\system32)" in a directory on the flash/zip drive? Could they go
> in the dir with editor.exe, or would it be better to give them a dir of
> their own?

First let me say that U2UTILS.EXE has been updated, and there are now two BATch
files in it, one for 9x (U2UTL9x.BAT) and one for NT (U2UTLNT.BAT), which
automatically install everything in the ZIP for you in the appropriate
directories. And it does some other useful things too. Go to the **Web
version** of README.1ST to read more about it _before_ you use it (I haven't
updated the README.1ST in XYWEB119.ZIP yet):
 http://users.datarealm.com/xywwweb/XYWEBTXT.HTM#ExtF

It entirely depends on the machine to which your flash drive is connected. (By
flash drive you mean USB memory key, right?) If its a machine that you use
daily, and the flash drive simply represents a form of sneaker net, then set
the host machine up as if you own it. Put U2UTILS.EXE on the flash drive in
Editor's directory (I presume you have a complete XyWrite installation on the
flash drive), unpack the files in U2UTILS, then run U2UTL9x.BAT off the flash
drive, and it will put the appropriate files on the host's BootDrive. If its a
guest machine (i.e. you're a guest on a borrowed machine), then there's another
scenario. I'm not familiar with Carl's Portable config but what you basically
want to do is run Editor off a BATch file like this **from Editor's directory**:

 @echo off
 setlocal
 echo. @PROMPT e0'SET UTOO='$_rcx$_9$_w0$_q>.\UTOO.BAT
 %COMSPEC% /c .\UTOO.BAT|debug .\UTOO.BAT
 cd>>.\UTOO.BAT
 for %%s in (CALL DEL) do %%s .\UTOO.BAT
 set PATH=%UTOO%;%PATH%;
 editor.exe

Simple, huh?  That gets the current drive:\path into
environment variable %UTOO%, which in turn puts Editor's directory at the top
of the Path. Thus, when the OpSys is seeking files that Editor requires, it
looks first in Editor's dir, then in the normal Path. So dump the entire
contents U2UTILS.EXE in Editor's dir; don't move them anywhere. Set all the
files in U2UTILS that are referenced in REG to point at Editor's dir, thus:
 instead of e.g.
Touch_Com=G:\XY4\TOUCH.COM
 write
Touch_Com=>JM 2.GetPathQ2 \TOUCH.COM
Just copy that prefix (>JM 2.GetPathQ2 \) into every
filespec (except Comspec_W?? and a couple of other obvious ones), erasing all
hard coded paths with this prefix. That way, no matter what machine you carry
your flash drive to, REG will always point at the local d:\path of Editor that
has been assigned by the host machine (which will change, probably, with every
machine). Then you have a portable REG file.

I do the same thing with all DeFaults in DFL that reference files. I move them
to STARTUP.INT (comment them out in DFL). So, e.g., at the top of INT I put
something like this:

>JM 2.GetPathQ2 ;*; Get the d:\path to Editor in S/G 50
SX01,>;*; The driveletter of Editor
BX :Q2 ;*; Switch to Editor's drive
>{less_than}3>+"\">;*; Add
  terminal backslash if in root dir (S/G50 is only two characters)
BX cd Q2 ;*; ChangeDir to Editor's dir without
  affecting S/G50 (we need it later)

then execute rest of STARTUP.INT, and include things like
BX d DR=\docsQ2 ;*; Set path to overflow files to
  d:\editor's_dir\docs (moved from DFL)

And etc. Making a truly portable setup requires thought,
but it is eminently doable.

Get it? Got it. Good.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------