James Bateson
James Bateson

Reputation: 1237

Wix - WixBundleOriginalSourceFolder vs WixBundleSourceProcessFolder

The documentation for the WiX built-in variables is here.

WixBundleOriginalSourceFolder - gets the folder from where the bundle originally ran.

WixBundleSourceProcessFolder - gets the source folder of the bundle where originally executed. Will only be set when bundle is executing in the clean room

Two questions:

I'm coming across an issue where the product has already been installed. In which case, WixBundleOriginalSourceFolder is not what I want. I want the folder where the user has just double clicked on the setup.exe, which may be different to the original folder. WixBundleSourceProcessFolder seems to give me the right folder but the description of it makes me a bit nervous and I wanted some clarification on what it really means.

Upvotes: 4

Views: 1233

Answers (2)

intinit
intinit

Reputation: 490

To tighten up slightly on the answer that Sharpenologist gave:

WixBundleOriginalSourceFolder is where the software was originally run from. So if you downloaded something and ran it from your downloads folder, that's what it will return. WiX remembers this location for all subsequent runs, even if you've now deleted that folder (or removed it, if it was, say, a DVD or USB key). So on uninstall, this folder will be the place that you originally run the install from, whether it exists or not.

WixBundleSourceProcessFolder is where the software is currently being run from. So this might be the same as WixBundleOriginalSourceFolder on first run, but will come from the package cache on a repair or a uninstall. It'll also come from the package cache if you need a reboot during installation.

Is that any clearer?

Upvotes: 1

Sharpenologist
Sharpenologist

Reputation: 187

In this context, 'ran' means where the bundle executable was located when it was double-clicked [or run from a command line] ... and 'executed' means the location where a copy of the bundle executable was actually run by the system after it was invoked.

Clear as mud?

Upvotes: 2

Related Questions