PDA

View Full Version : PATH in AUTOEXEC.BAT keeps getting replaced



NewsArchive
10-23-1997, 12:00 AM
I am using ISExpress 2.01
I want to add a directory to the PATH in the client's AUTOEXEC.BAT.
I want to append to the path, but after the install takes place, it
REPLACES the path. Thus, on the next boot-up, C:\Windows is not part of
the path and win.com cannot load.
Why is ISXP replacing the path instead of appending to it?

NewsArchive
10-12-2001, 12:00 AM
Hi Mario,

On Windows NT and 2000, the environment variables will not be added via
autoexec.bat. I did a little experimentation in Windows 2000, and having
quotes around the path doesn't cause any problems. So, just set the
Environment variable's value to: "[INSTALLDIR]" (with the quotes). That
should make it work for all platforms.

Rich Aquino
Software Developer
InstallShield Software Corporation


"Mario" <mario.cauwe@quadrat.be> wrote in message
news:3bc6f89e$1@news.installshield.com...
> Two components are not a solution I think. The only way to do is, is add
a
> custom action, which is only executed on win9x and that uses the batchfile
> function in a script.
>
> Any other, more simple ideas?
>
> "Mario" <mario.cauwe@quadrat.be> wrote in message
> news:3bc6f6f0@news.installshield.com...
> > Hello,
> >
> > InstallShield does not correctly update the path variable in
autoexec.bat
> > files if you use the IDE to change the environment variables.
INSTALLDIR
> is
> > entered as c:\Program files\... instead of c:\progra~1\...
> >
> > When I put quotes around the INSTALLDIR, it will probably work on win9x
> > systems, but windows2000 doesn't accept the quotes.
> >
> > So I guess, I have to create two components which are only installed
> > depending on the OS.
> >
> > regards,
> > Mario
> >
> >
>
>

NewsArchive
10-15-2001, 12:00 AM
Hi Rich,

It would have been nice, but the quotes in the path are not valid on
Windows2000.
I put quotes around it: "[INSTALLDIR]dll" but the dll's are not found when I
run the application. When I remove the quotes (through the environment
variables settings in Win2000, as a test), the dll's are found.

I'm testing on Windows2000 5.00.2195 Service pack 1. But this shouldn't
make a difference.

Mario



"Rich Aquino" <NoResponsePlease@installshield.com> wrote in message
news:3bc73b71$1@news.installshield.com...
> Hi Mario,
>
> On Windows NT and 2000, the environment variables will not be added via
> autoexec.bat. I did a little experimentation in Windows 2000, and having
> quotes around the path doesn't cause any problems. So, just set the
> Environment variable's value to: "[INSTALLDIR]" (with the quotes). That
> should make it work for all platforms.
>
> Rich Aquino
> Software Developer
> InstallShield Software Corporation
>
>
> "Mario" <mario.cauwe@quadrat.be> wrote in message
> news:3bc6f89e$1@news.installshield.com...
> > Two components are not a solution I think. The only way to do is, is
add
> a
> > custom action, which is only executed on win9x and that uses the
batchfile
> > function in a script.
> >
> > Any other, more simple ideas?
> >
> > "Mario" <mario.cauwe@quadrat.be> wrote in message
> > news:3bc6f6f0@news.installshield.com...
> > > Hello,
> > >
> > > InstallShield does not correctly update the path variable in
> autoexec.bat
> > > files if you use the IDE to change the environment variables.
> INSTALLDIR
> > is
> > > entered as c:\Program files\... instead of c:\progra~1\...
> > >
> > > When I put quotes around the INSTALLDIR, it will probably work on
win9x
> > > systems, but windows2000 doesn't accept the quotes.
> > >
> > > So I guess, I have to create two components which are only installed
> > > depending on the OS.
> > >
> > > regards,
> > > Mario
> > >
> > >
> >
> >
>
>

NewsArchive
10-15-2001, 12:00 AM
Hi Mario,

That's really interesting behavior. In my experimentation, I was trying to
launch EXEs from a command window. I was getting the same results with and
without the quotes.

I'd next try to use an app path instead of the system path.

If that doesn't work, you may be forced to use a condition to get this
working. You could try this...

Set the value of your environment variable to this:
[WIN9X_QUOTE][INSTALLDIR]dll[WIN9X_QUOTE]

Early in your installation use a custom action that sets the value of
WIN9X_QUOTE to a double-quote. Then set the condition for this custom
action so that it only runs on win9x systems.

This approach will make the value be "[INSTALLDIR]dll" on win9x systems, and
[INSTALLDIR]dll on other systems. (Of course, [INSTALLDIR] will be
resolved)

Rich Aquino
Software Developer
InstallShield Software Corporation

"Mario" <mario.cauwe@quadrat.be> wrote in message
news:3bca8f7d$1@news.installshield.com...
> Hi Rich,
>
> It would have been nice, but the quotes in the path are not valid on
> Windows2000.
> I put quotes around it: "[INSTALLDIR]dll" but the dll's are not found when
I
> run the application. When I remove the quotes (through the environment
> variables settings in Win2000, as a test), the dll's are found.
>
> I'm testing on Windows2000 5.00.2195 Service pack 1. But this shouldn't
> make a difference.
>
> Mario
>
>
>
> "Rich Aquino" <NoResponsePlease@installshield.com> wrote in message
> news:3bc73b71$1@news.installshield.com...
> > Hi Mario,
> >
> > On Windows NT and 2000, the environment variables will not be added via
> > autoexec.bat. I did a little experimentation in Windows 2000, and
having
> > quotes around the path doesn't cause any problems. So, just set the
> > Environment variable's value to: "[INSTALLDIR]" (with the quotes). That
> > should make it work for all platforms.
> >
> > Rich Aquino
> > Software Developer
> > InstallShield Software Corporation
> >
> >
> > "Mario" <mario.cauwe@quadrat.be> wrote in message
> > news:3bc6f89e$1@news.installshield.com...
> > > Two components are not a solution I think. The only way to do is, is
> add
> > a
> > > custom action, which is only executed on win9x and that uses the
> batchfile
> > > function in a script.
> > >
> > > Any other, more simple ideas?
> > >
> > > "Mario" <mario.cauwe@quadrat.be> wrote in message
> > > news:3bc6f6f0@news.installshield.com...
> > > > Hello,
> > > >
> > > > InstallShield does not correctly update the path variable in
> > autoexec.bat
> > > > files if you use the IDE to change the environment variables.
> > INSTALLDIR
> > > is
> > > > entered as c:\Program files\... instead of c:\progra~1\...
> > > >
> > > > When I put quotes around the INSTALLDIR, it will probably work on
> win9x
> > > > systems, but windows2000 doesn't accept the quotes.
> > > >
> > > > So I guess, I have to create two components which are only installed
> > > > depending on the OS.
> > > >
> > > > regards,
> > > > Mario
> > > >
> > > >
> > >
> > >
> >
> >
>
>

NewsArchive
10-16-2001, 12:00 AM
Hi,

That certainly is strange behavior. I just tested like you did. I put a
batch file in my program files directory and it executed from dosbox,
independant from quotes in the path. Maybe it doesn't work for dll's called
from a within a program.
Strange, but now I use the quote property you suggested and this does the
job in an easy and clean way.

Thanks,
Mario

"Rich Aquino" <NoResponsePlease@installshield.com> wrote in message
news:3bcb62ab$1@news.installshield.com...
> Hi Mario,
>
> That's really interesting behavior. In my experimentation, I was trying
to
> launch EXEs from a command window. I was getting the same results with
and
> without the quotes.
>
> I'd next try to use an app path instead of the system path.
>
> If that doesn't work, you may be forced to use a condition to get this
> working. You could try this...
>
> Set the value of your environment variable to this:
> [WIN9X_QUOTE][INSTALLDIR]dll[WIN9X_QUOTE]
>
> Early in your installation use a custom action that sets the value of
> WIN9X_QUOTE to a double-quote. Then set the condition for this custom
> action so that it only runs on win9x systems.
>
> This approach will make the value be "[INSTALLDIR]dll" on win9x systems,
and
> [INSTALLDIR]dll on other systems. (Of course, [INSTALLDIR] will be
> resolved)
>
> Rich Aquino
> Software Developer
> InstallShield Software Corporation
>
> "Mario" <mario.cauwe@quadrat.be> wrote in message
> news:3bca8f7d$1@news.installshield.com...
> > Hi Rich,
> >
> > It would have been nice, but the quotes in the path are not valid on
> > Windows2000.
> > I put quotes around it: "[INSTALLDIR]dll" but the dll's are not found
when
> I
> > run the application. When I remove the quotes (through the environment
> > variables settings in Win2000, as a test), the dll's are found.
> >
> > I'm testing on Windows2000 5.00.2195 Service pack 1. But this shouldn't
> > make a difference.
> >
> > Mario
> >
> >
> >
> > "Rich Aquino" <NoResponsePlease@installshield.com> wrote in message
> > news:3bc73b71$1@news.installshield.com...
> > > Hi Mario,
> > >
> > > On Windows NT and 2000, the environment variables will not be added
via
> > > autoexec.bat. I did a little experimentation in Windows 2000, and
> having
> > > quotes around the path doesn't cause any problems. So, just set the
> > > Environment variable's value to: "[INSTALLDIR]" (with the quotes).
That
> > > should make it work for all platforms.
> > >
> > > Rich Aquino
> > > Software Developer
> > > InstallShield Software Corporation
> > >
> > >
> > > "Mario" <mario.cauwe@quadrat.be> wrote in message
> > > news:3bc6f89e$1@news.installshield.com...
> > > > Two components are not a solution I think. The only way to do is,
is
> > add
> > > a
> > > > custom action, which is only executed on win9x and that uses the
> > batchfile
> > > > function in a script.
> > > >
> > > > Any other, more simple ideas?
> > > >
> > > > "Mario" <mario.cauwe@quadrat.be> wrote in message
> > > > news:3bc6f6f0@news.installshield.com...
> > > > > Hello,
> > > > >
> > > > > InstallShield does not correctly update the path variable in
> > > autoexec.bat
> > > > > files if you use the IDE to change the environment variables.
> > > INSTALLDIR
> > > > is
> > > > > entered as c:\Program files\... instead of c:\progra~1\...
> > > > >
> > > > > When I put quotes around the INSTALLDIR, it will probably work on
> > win9x
> > > > > systems, but windows2000 doesn't accept the quotes.
> > > > >
> > > > > So I guess, I have to create two components which are only
installed
> > > > > depending on the OS.
> > > > >
> > > > > regards,
> > > > > Mario
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>