How to add a path the the PATH environment variable

How to add a path the the PATH environment variable

Post by Rob Lamber » Sat, 20 Dec 2003 05:57:58


Hi,
Whats the "recommended" way to check to see if a path is already on in
the PATH environment variable, and if not, to put it there during the
installation.

And... how do you detect it and remove it if detected during uninstall
operations?

I can do a registry search to get the current value of the PATH
I can structure the registry entry to add my install path to the PATH

but I can't figure out how to test the pre-installation PATH value for
the presence of the application specific path that I need to install
(for instances of upgrade installations).
 
 
 

How to add a path the the PATH environment variable

Post by Phil Wilso » Sun, 21 Dec 2003 04:24:15

The general answer in the Windows Installer world is to use the Environment
Table (see Platform SDK, Windows Installer section). VS setup projects don't
give you an IDE interface to this however, so you'd need to edit the MSI file
manually with Orca to add your entry. There's a "create if it doesn't exist"
choice.
--
Phil Wilson [MVP Windows Installer]
----

 
 
 

How to add a path the the PATH environment variable

Post by Rob Lamber » Sun, 21 Dec 2003 05:08:19

On Fri, 19 Dec 2003 11:24:15 -0800, "Phil Wilson"



I saw a reference to Orca in another threa on this topic, but I have
no idea what it is, neither does anyone I work with, and I can't find
any other references to it in these newsgroups.

what is Orca?
 
 
 

How to add a path the the PATH environment variable

Post by Phil Wilso » Sun, 21 Dec 2003 07:55:55

Orca is in the Windows Installer SDK, which is part of the Platform SDK, and
Orca is installed from Orca.msi. It's an MSI file editor/viewer.
--
Phil Wilson [MVP Windows Installer]
----