I am creating a Visual Studio 2008 Setup Wizard for my program
http://support.microsoft.com/kb/307353
I see that it is possible to add registry entries, etc..
Is the
Warning:
Please do not use this approach. It is dangerous. Use built-in MSI features for environment variable update.Example: Writing straight to
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment-Pathwill wipe out whatever is already there. Very serious.Solution: MSI features the Environment table to facilitate merging and updating of environment variables in a reliable fashion. Note that this table is also known to be complex enough to trigger unexpected results. Please test well. Uninstall scenarios especially.
Using Visual Studio 2008, you can easily do it by setting the appropriate variable in the Windows registry:
If you want the Value to reference the installation directory, you can do it like this using property variables: [TARGETDIR]SomeFile.ext (see http://msdn.microsoft.com/en-us/library/aa370905%28v=vs.85%29.aspx for more property variables)