Hi SBuramoni,
You can try to use a custom action to set your installation path to the environment variable. The TARGETDIR property specifies the root destination directory for the installation. You can pass this value to the custom action via its CustomActionData property. As far as I know, there are two options for you to add the environment variable in the custom action.
First one is to use the setx tool to set the environment variable. This tool extends the set command so that permanent changes in the environment variables can be made. For example, to add a folder C:\MyFolder to the path, the command would be:
Code Snippet
setx path
"%PATH%;C:\MyFolder"
Second one is to add the environment variable to the Registry table. You can add environment variable for current user to the following key:
HKEY_CURRENT_USER\Environment
And system environment variable can be found in the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
For information about custom action, please check:
http://msdn2.microsoft.com/en-us/library/aa368066(VS.85).aspx
http://msdn2.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx
Hope this helps.
Best regards.
Rong-Chun Zhang