1. RE: Searching for paths

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     » topic index » view message » categorize

2. RE: Searching for paths

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 message » categorize

3. RE: Searching for paths

I'm trying to determine the ACTIVELY installed copy of euphoria. Without 
relying on environment variables, because for my case, they may not be 
initialized yet.

For example, I have Eu2.3 actively installed, but I also still have my 
old eu2.2 directory, still fully intact. That's why I would need to 
continue to search for ex.exe even after finding it.

Chris


Derek Parnell wrote:
> Chris,
> are you trying to find out if Euphoria is installed or not?
> 
> If you are, then you might like to look at the directories in the PATH
> symbol, looking for ex.exe *and* exw.exe in the same directory. Unless 
> the
> user has done some serious rearranging of the Euphoria directory 
> structure,
> you should find ex.exe in a EUPHORIA\BIN directory somewhere on the 
> path.
> 
> ----- Original Message -----
> From: <bensler at mail.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Tuesday, February 26, 2002 5:49 AM
> Subject: Searching for paths
> 
> 
> > 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 message » categorize

4. RE: Searching for paths

Assume:
I'm installing version 2.4 on my system.
I currently have version 2.3 installed and working properly on my 
system.
I proceed with the installation of v2.4.
The first thing I do is rename the existing Euphoria directory. The 
environment is still setup, but doesn't point to a valid directory 
anymore. (INACTIVE installation)

I continue to install v2.4 by running the EUsetup.exe, which in turn 
creates a new euphoria directory (possibly in a user specified 
directory?). (ACTIVE installation)

The existing EU environment variables may or may not be correct now.

Next, I try to run my registry installer (haven't reset yet), which 
needs to find where EU is actively installed in order to create the 
context command associations for the EU file types.

Without first resetting the computer, I can't verify the EU path.

Q:
Is it nesseccary to reset after adding registry keys? (I can get away 
with just logging off and back on again as the same user, but it's the 
same effect)
I seem to get random results if I don't reset after merging a registry 
file. Sometimes all associations, icons, etc.. are updated without 
resetting. Other times, some icons or context menus, etc.. won't be 
updated. (Using the SAME registry file, after removing associations from 
a prior attempt)

Chris


Derek Parnell wrote:
> ----- Original Message -----
> From: <bensler at mail.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Tuesday, February 26, 2002 4:51 PM
> Subject: RE: Searching for paths
> 
> 
> > I'm trying to determine the ACTIVELY installed copy of euphoria. Without
> > relying on environment variables, because for my case, they may not be
> > initialized yet.
> >
> > For example, I have Eu2.3 actively installed, but I also still have my
> > old eu2.2 directory, still fully intact. That's why I would need to
> > continue to search for ex.exe even after finding it.
> >
> > Chris
> >
> 
> I don't know what you mean by ACTIVELY installed. Is this different to
> INACTIVELY installed? If so, I would have thought that the active 
> Euphoria
> was the one that was on the PATH. That's why I said to scan the 
> directories
> in the PATH for ex.exe. If however, ACTIVE means "on disk" then just 
> scan
> every directory.
> 
> Also, what do you mean by "continue to search for ex.exe even after 
> finding
> it". If you've found it, why would you continue to search for it? Or do 
> mean
> you need to find all files that have the name "ex.exe"?
> 
> 
> > Derek Parnell wrote:
> > > Chris,
> > > are you trying to find out if Euphoria is installed or not?
> > >
> > > If you are, then you might like to look at the directories in the PATH
> > > symbol, looking for ex.exe *and* exw.exe in the same directory. Unless
> > > the
> > > user has done some serious rearranging of the Euphoria directory
> > > structure,
> > > you should find ex.exe in a EUPHORIA\BIN directory somewhere on the
> > > path.
> > >
> > > ----- Original Message -----
> > > From: <bensler at mail.com>
> > > To: "EUforum" <EUforum at topica.com>
> > > Sent: Tuesday, February 26, 2002 5:49 AM
> > > Subject: Searching for paths
> > >
> > >
> > > > 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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu