How to write InstallLocation infomation in Registry when using VS2005 Deployment Project

Step1: open msi in Orca.

Step2: Select Transform / New Transform

Step3: Create new row in CustomAction table.
{Action} SetInstallLocation
{Type} 51
{Source} ARPINSTALLLOCATION
{Target} [TARGETDIR]

Step4: then add a new row to the InstallExecuteSequence table
{Action} SetInstallLocation
{Condition} ARPINSTALLLOCATION=""
{Sequence} 798
Step5: Once everything is entered,
select Generate Transform from the Transform menu,
and save the file(Filename is AddInstallLocation.mst).

Step6: Now apply that transform from the command line
using MsiTran.exe (in Windows SDK).
This can be added to the PostBuildEvent:

"C:\Program Files\Windows Installer 4.5 SDK\TOOLS\msitran" -a "$(ProjectDir)AddInstallLocation.mst" "$(BuiltOuputPath)"

虹光大成就-密教灌頂(一)