RE: Searching for paths

new topic     » goto parent     » topic index » view thread      » older message » newer message

I had thought of that too.

My reason for not assuming EUDIR exists is because if someone wants to 
install Euphoria, and then use the registry, they will need to restart 
the computer before proceeding with the registry update, then they need 
to restart again so the registry changes can fully take effect. I'm 
trying to eliminate that. I guess I could open up autoexec.bat and check 
if EUDIR is defined, but not every system uses autoexec.bat. Full circle 
back to my problem.

I only have experience using win98 and under, so I'm not familiar with 
how other versions of Windows handles WINDIR, and what files I should 
expect to find.

Chris

Brian Broker wrote:
> Well you won't find a win.exe on an NT-based system.  But I don't think 
> a system will run very well if WINDIR is not defined.  I'm thinking you 
> should assume WINDIR will always be defined (can somebody prove that to 
> be a bad assumption?) 
> 
> Same goes for EUDIR... if not defined, assume that Euphoria is not 
> installed (at least it's not properly installed).
> 
> -- Brian
> 
> 
> Chris wrote:
> > Hi all, 
> > 
> >   I need to determine the Euphoria directory, and the Windows directory.
> > I can use get_env() to get %EUDIR and %WINDIR.
> > What if one/both of those don't exist?
> > 
> >   I can do a walk_dir() search for ex.exe and win.exe(com?), but is that 
> > sufficient? Any one computer can have more than one copy of both EU and 
> > Windows. What if the file I'm looking for has been renamed?
> > How can I guarantee that I have found the right directories?
> > Would I find win.exe on >win98 ?
> > 
> > My plan so far is to check the environment variables, if I can't find 
> > them, then I walk_dir() starting from C:\ looking for ex.exe, even if I 
> > find it, continue searching to determine if there is a second copy.
> > If I find a second copy, then I can't verify the Euphoria directory, and 
> > 
> > 
> > the user must be prompted for it.
> > Same for WINDIR. I could see this being pretty slow though.
> > Maybe I'm just trying too hard to automate it.
> > 
> > My second plan is to just search for the specific directory if the 
> > environment variable doesn't exist. Can't find %EUDIR variable, then 
> > check if C:\Euphoria exists, if not, prompt the user.
> > 
> > Also, is there a simple DOS way of determining the drive letters 
> > available? So I can walk the drives as well.
> > 
> > Thanx
> > Chris
> > 
> >

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu