Page 1 of 1

How do I get the current install folder?

Posted: Tue Oct 08, 2013 6:01 am
by JohnO
I create a file (build_id.txt) in the $TARGETDIR$, that holds the Jenkins BUILD_ID. I need to delete this when installing over an existing product version. However, at the point where I would do this ([DEFINE REGION: Install Application Pre-Requisites]), the user hasn't specified where they want to install the product. Which means the value held by $TARGETDIR$ is the default (c:\Program Files...), which may not be where the product was installed.

What I need to know at this point, is where the current product is installed. This location must be known in order to un-install and update. I have searched the docs for a suitable variable, without success. I have scanned the main MSI code, and 'updates' for inspiration, and drawn a blank.

Regards, John